Example #1
0
 def Enqueue(self, locations):        
     app_instance = utils.get_main_window()
     current_view = app_instance.playlist_ui.get_selected_song_view()
     app_instance.list_manager.switch_to_local()        
     if current_view:
         uris = utils.convert_args_to_uris(locations)                
         current_view.play_uris(uris)
Example #2
0
    def post_start(self):
        if self.db_ready and self.app_ready:
            # restore = True
            if self.app_instance:
                current_view = self.app_instance.playlist_ui.get_selected_song_view()
                from utils import convert_args_to_uris
                args = convert_args_to_uris(self.args)
                if len(args) > 0:
                    if current_view:
                        # restore = False
                        current_view.add_file(args[0], play=True)
                if args[1:]:
                    if current_view:
                        current_view.async_add_uris(args[1:], False)
            # if restore:
            #     from player import Player
            #     Player.load()

            if self.options.StartAnyway and self.check_result == "command":
                import dbus_manager
                dbus_manager.run_commands(self.options, self.dbus)

            self.start_fetch_manager()
Example #3
0
 def post_start(self):    
     if self.db_ready and self.app_ready:
         # restore = True
         if self.app_instance:
             current_view = self.app_instance.playlist_ui.get_selected_song_view()
             from utils import convert_args_to_uris
             args = convert_args_to_uris(self.args)
             if len(args) > 0:
                 if current_view:
                     # restore = False
                     current_view.add_file(args[0], play=True)
             if args[1:]:
                 if current_view:
                     current_view.async_add_uris(args[1:], False)
         # if restore:
         #     from player import Player            
         #     Player.load()
             
         if self.options.StartAnyway and self.check_result == "command":
             import dbus_manager
             dbus_manager.run_commands(self.options, self.dbus)
             
         self.start_fetch_manager()