]> kaliko git repositories - mpd-sima.git/blobdiff - sima/client.py
crop: Allow negative value for consume to disable plugin
[mpd-sima.git] / sima / client.py
index f64277e8f1bd21b2325d62a654dbe74362a73d08..66894a77a3516faeb3918a76a9943e4451d76825 100644 (file)
@@ -159,8 +159,8 @@ class PlayerClient(Player):
         else:
             self.log.info('Player: Initialising cache!')
         self._cache = {
-                'artists': None,
-                'nombid_artists': None,
+                'artists': frozenset(),
+                'nombid_artists': frozenset(),
                 }
         self._cache['artists'] = frozenset(self._execute('list', ['artist']))
         if Artist.use_mbid:
@@ -206,9 +206,9 @@ class PlayerClient(Player):
         if artist.mbid:
             # we already performed a lookup on artists with mbid set
             # search through remaining artists
-            artists = self._cache.get('nombid_artists', [])
+            artists = self._cache.get('nombid_artists')
         else:
-            artists = self._cache.get('artists', [])
+            artists = self._cache.get('artists')
         match = get_close_matches(artist.name, artists, 50, 0.73)
         if not match and not found:
             return