コード例 #1
0
 def allocation_lrc_file(self, song, lrc_path):    
     if os.path.exists(lrc_path):
         if self.vaild_lrc(lrc_path):
             save_lrc_path = self.get_lrc_filepath(song)
             if os.path.exists(save_lrc_path): os.unlink(save_lrc_path)
             utils.run_command("cp %s %s" % (lrc_path, save_lrc_path))
             Dispatcher.reload_lrc(song)
コード例 #2
0
 def unallocation_lrc_file(self, song):
     try:
         del song["location_lrc"]
     except KeyError:
         pass
     else:
         Dispatcher.reload_lrc(song)
コード例 #3
0
 def allocation_lrc_file(self, song, lrc_path):
     if os.path.exists(lrc_path):
         if self.vaild_lrc(lrc_path):
             save_lrc_path = self.get_lrc_filepath(song)
             if os.path.exists(save_lrc_path): os.unlink(save_lrc_path)
             utils.run_command("cp %s %s" % (lrc_path, save_lrc_path))
             Dispatcher.reload_lrc(song)
コード例 #4
0
 def unallocation_lrc_file(self, song):            
     try:
         del song["location_lrc"]
     except KeyError:    
         pass
     else:
         Dispatcher.reload_lrc(song)
コード例 #5
0
 def render_download(self, result):
     if result:
         Dispatcher.reload_lrc(Player.song)
         self.prompt_label.set_text(_("File save to %s") % config.get("lyrics", "save_lrc_path"))
     else:    
         self.prompt_label.set_text(_("Fail to download!"))
コード例 #6
0
 def render_download(self, result):
     if result:
         Dispatcher.reload_lrc(Player.song)
         self.prompt_label.set_text("%s %s" % (_("File save to"), config.get("lyrics", "save_lrc_path")))
     else:    
         self.prompt_label.set_text(_("Download failed."))