예제 #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)
 def unallocation_lrc_file(self, song):            
     try:
         del song["location_lrc"]
     except KeyError:    
         pass
     else:
         Dispatcher.reload_lrc(song)
 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."))