owais / remember-the-rhythm

Rhythbox plugin to remember the last playing song and position
GNU General Public License v3.0
15 stars 11 forks source link

Plugin doesn't find playlist on startup. #6

Open askvortsov-ideas opened 9 years ago

askvortsov-ideas commented 9 years ago

For some reason playlists are not loaded in RhythmBox at the time of DB load-complete event. To circumvent this, I've changed the way plugin.load_complete is invoked:

    def try_load(self, *args, **kwargs):
        if len(self.playlist_manager.get_playlists()) == 0:
            GObject.idle_add(self.load_complete)
        else:
            self.load_complete()

and registred this method for load-complete event instead of just self.load_complete.