]> kaliko git repositories - mpd-sima.git/blobdiff - sima/client.py
New, slightly enhanced, meta Objects.
[mpd-sima.git] / sima / client.py
index 9eae523bd574e209d5e0c7ff8459e532b90d9370..1d3a0103c54353c4e74a4613fa68cda17489b9be 100644 (file)
@@ -58,6 +58,8 @@ def blacklist(artist=False, album=False, track=False):
     field = (artist, album, track)
     def decorated(func):
         def wrapper(*args, **kwargs):
+            if not args[0].database:
+                return func(*args, **kwargs)
             cls = args[0]
             boolgen = (bl for bl in field)
             bl_fun = (cls.database.get_bl_artist,
@@ -217,7 +219,7 @@ class PlayerClient(Player):
         # Check against the actual string in artist list
         if artist.orig in self.artists:
             self.log.debug('found exact match for "%s"' % artist)
-            return [artist]
+            return [artist.orig]
         # Then proceed with fuzzy matching if got nothing
         match = get_close_matches(artist.orig, self.artists, 50, 0.73)
         if not match: