X-Git-Url: http://git.kaliko.me/?a=blobdiff_plain;f=sima%2Fclient.py;h=1d3a0103c54353c4e74a4613fa68cda17489b9be;hb=2eb13c85fe72ade75193b589748920615fbb22d2;hp=9eae523bd574e209d5e0c7ff8459e532b90d9370;hpb=5adf0b495521a6f15f208474a026c088476e5018;p=mpd-sima.git diff --git a/sima/client.py b/sima/client.py index 9eae523..1d3a010 100644 --- a/sima/client.py +++ b/sima/client.py @@ -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: