예제 #1
0
 def fill_list(self, listName):
     self.listName = listName
     self.set_current_row(-1)
     self.playlistFile = composite_playlist_path_use_name(listName)
     if not os.path.exists(self.playlistFile):
         print('列表"%s"不存在' % listName)
         self.clear_list()
         self.listName = ''
         self.playlistFile = ''
         return
     try:
         self.get_value_from_dict(parse_json_file(self.playlistFile))
     except ValueError:
         self.clear_list()
         print('加载列表内容出错!')
예제 #2
0
 def fill_list(self, listName):
     self.listName = listName
     self.set_current_row(-1)
     self.playlistFile = composite_playlist_path_use_name(listName)
     if not os.path.exists(self.playlistFile):
         print('列表"%s"不存在'%listName)
         self.clear_list()
         self.listName = ''
         self.playlistFile = ''
         return
     try: 
         self.get_value_from_dict(parse_json_file(self.playlistFile))
     except ValueError:
         self.clear_list()
         print('加载列表内容出错!')
예제 #3
0
 def create_a_playlist(self, listName):
     playlistFile = composite_playlist_path_use_name(listName)
     if not os.path.exists(playlistFile):
         write_into_disk(playlistFile, wrap_playlist_datas())
     self.playlistNames.append(listName)
     self.commit_records()
예제 #4
0
 def create_a_playlist(self, listName):
     playlistFile = composite_playlist_path_use_name(listName)
     if not os.path.exists(playlistFile):
         write_into_disk(playlistFile, wrap_playlist_datas())
     self.playlistNames.append(listName)
     self.commit_records()