[gnome-music] Start listening to tracker notification only after all plugins are loaded



commit 775f32a84f2b4c4617ab7192efaf75f6225ee9d6
Author: Vadim Rutkovsky <vrutkovs redhat com>
Date:   Wed Jul 15 10:37:29 2015 +0200

    Start listening to tracker notification only after all plugins are loaded

 gnomemusic/grilo.py |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gnomemusic/grilo.py b/gnomemusic/grilo.py
index 54e6482..4d72dde 100644
--- a/gnomemusic/grilo.py
+++ b/gnomemusic/grilo.py
@@ -99,6 +99,9 @@ class Grilo(GObject.GObject):
             logger.error('Failed to load plugins.')
         if self.tracker is not None:
             logger.debug("tracker found")
+            self.tracker.notify_change_start()
+            self.notification_handler = self.tracker.connect(
+                'content-changed', self._on_content_changed)
 
     @log
     def _on_content_changed(self, mediaSource, changedMedias, changeType, locationUnknown):
@@ -163,9 +166,6 @@ class Grilo(GObject.GObject):
 
                     if self.tracker is not None:
                         self.emit('ready')
-                        self.tracker.notify_change_start()
-                        self.notification_handler = self.tracker.connect(
-                            'content-changed', self._on_content_changed)
 
             elif (id.startswith('grl-upnp')):
                 logger.debug("found upnp source %s", id)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]