]> kaliko git repositories - mpd-sima.git/commitdiff
Some cleanup in log, get messages more uniform across plugins
authorkaliko <kaliko@azylum.org>
Fri, 19 Feb 2021 17:24:00 +0000 (18:24 +0100)
committerkaliko <kaliko@azylum.org>
Fri, 19 Feb 2021 17:24:00 +0000 (18:24 +0100)
sima/lib/plugin.py
sima/lib/webserv.py

index 6ffff1affe5d56ffaf0398fa1047c026c15038ea..49cd7f155d9c0ee057e0353aef4e27cf4e28f10f 100644 (file)
@@ -214,8 +214,8 @@ class AdvancedPlugin(Plugin):
         if not album_to_queue:
             self.log.info('No album found for "%s"', artist)
             return None
-        self.log.info('%s album candidate: %s - %s', self.__class__.__name__,
-                      artist, album_to_queue)
+        self.log.info('%s plugin chose album: %s - %s',
+                      self.__class__.__name__, artist, album_to_queue)
         return album_to_queue
 
     def filter_track(self, tracks, unplayed=False):
index 0770ea8ae0afe4b84d96e3df0cdd13923b412016..96d63afa000e5abde869054fd247f502b616c4b4 100644 (file)
@@ -327,7 +327,7 @@ class WebService(AdvancedPlugin):
             self.log.debug('Found no tracks to queue!')
             return
         for track in self.to_add:
-            self.log.info('%s candidates: %s', track, self.ws.name)
+            self.log.info('%s plugin chose: %s', self.ws.name, trk)
 
     def _album(self):
         """Get albums for album queue mode
@@ -356,6 +356,8 @@ class WebService(AdvancedPlugin):
         msg = ' '.join(['{0}: {1:>3d}'.format(k, v) for
                         k, v in sorted(self.ws.stats.items())])
         self.log.debug('http stats: ' + msg)
+        if not self.to_add:
+            self.log.info('%s plugin found nothing to queue', self.ws.name)
         candidates = self.to_add
         self.to_add = list()
         if self.plugin_conf.get('queue_mode') != 'album':