]> kaliko git repositories - mpd-sima.git/commitdiff
Some better logging messages to debug uniq bug
authorkaliko <kaliko@azylum.org>
Sat, 24 Oct 2015 09:59:19 +0000 (11:59 +0200)
committerkaliko <kaliko@azylum.org>
Sat, 24 Oct 2015 09:59:19 +0000 (11:59 +0200)
sima/client.py
sima/core.py
sima/launch.py
sima/plugins/core/uniq.py

index 79843e07a2cd1fd89581971740c17a5581b116e2..8d40edad13ba7bd99ac38af5249548d227cdb379 100644 (file)
@@ -411,6 +411,8 @@ class PlayerClient(Player):
                 self.log.info(self._client.tagtypes())
                 self.log.warning('Disabling MusicBrainzIdentifier')
                 Artist.use_mbid = False
+            else:
+                self.log.trace('Available metadata: %s', self._client.tagtypes())
         else:
             self.log.warning('Use of MusicBrainzIdentifier disabled!')
             self.log.info('Consider using MusicBrainzIdentifier for your music library')
index 8519e5da8abee6f821564b820979e85e4c15b63a..2ffb04c6e44c20ae7aedc564b212838b34a8361a 100644 (file)
@@ -73,10 +73,10 @@ class Sima(Daemon):
 
     def foreach_plugin(self, method, *args, **kwds):
         """Plugin's callbacks dispatcher"""
+        self.log.trace('dispatching %s to plugins', method)
         for plugin in self.core_plugins:
             getattr(plugin, method)(*args, **kwds)
         for plugin in self.plugins:
-            #self.log.debug('dispatching {0} to {1}'.format(method, plugin))
             getattr(plugin, method)(*args, **kwds)
 
     @property
index 21d2e552f8c3959c6c1daadc449793321b901011..e29fe289c1bd9df13f433496e2deaaae6f94af94 100644 (file)
@@ -102,7 +102,7 @@ def start(sopt, restart=False):
         config.write(sys.stdout, space_around_delimiters=True)
         sys.exit(0)
 
-    logger.info('Starting...')
+    logger.info('Starting (%s)...', info.__version__)
     sima = core.Sima(config)
 
     # required core plugins
index 0f42718ed992b89f8516788ea525e275269d773c..db2caffe41172faf8a27d8750da36f721e3f0800 100644 (file)
@@ -30,6 +30,7 @@ from socket import getfqdn
 # third parties components
 
 # local import
+from ...client import PlayerError
 from ...lib.plugin import Plugin
 
 
@@ -71,8 +72,11 @@ class Uniq(Plugin):
 
     def sub_chan(self):
         self.log.debug('Registering as {}'.format(self.chan))
-        self.player.subscribe(self.chan)
-        self._registred = True
+        try:
+            self.player.subscribe(self.chan)
+            self._registred = True
+        except PlayerError as err:
+            self.log.error('Failed to register: %s', err)
 
     def callback_need_track(self):
         if self.is_capable():