]> kaliko git repositories - mpd-sima.git/blobdiff - sima/plugins/internal/genre.py
More robust Tags plugin MPD filter configuration
[mpd-sima.git] / sima / plugins / internal / genre.py
index 264d8abfba25e79c5c17b9e7ee30911ca822fa80..1202f89716ca7e064289e1e796f8236c7bae8d7f 100644 (file)
@@ -65,8 +65,8 @@ class Genre(AdvancedPlugin):
     def fetch_genres(self):
         """Fetches ,at most, nb-depth genre from history,
         and returns the nbgenres most present"""
-        depth = 10 # nb of genre to fetch from history for analysis
-        nbgenres = 2 # nb of genre to return
+        depth = 10  # nb of genre to fetch from history for analysis
+        nbgenres = 2  # nb of genre to return
         genres = [g[0] for g in self.sdb.fetch_genres_history(limit=depth)]
         if not genres:
             self.log.debug('No genre found in current track history')
@@ -106,7 +106,7 @@ class Genre(AdvancedPlugin):
             if not trk:
                 continue
             if queue_mode == 'track':
-                self.log.info('Genre plugin chose: {}'.format(trk))
+                self.log.info('Genre plugin chose: %s', trk)
                 candidates.append(trk)
                 if len(candidates) == target:
                     break