X-Git-Url: https://git.kaliko.me/?a=blobdiff_plain;f=sima%2Fclient.py;h=fba50fdaf468c259febb6af304f85c2c4395ba99;hb=1d41464ccb6ff66441947eef0305518e3ce79a77;hp=929f66281fd7489cc2d001a75efa5755e3ffe138;hpb=37d13b2a067ed8cc5cde1fd167ef5c55d61087cf;p=mpd-sima.git diff --git a/sima/client.py b/sima/client.py index 929f662..fba50fd 100644 --- a/sima/client.py +++ b/sima/client.py @@ -22,7 +22,6 @@ except ImportError as err: from .lib.player import Player from .lib.track import Track from .lib.simastr import SimaStr -from .utils.leven import levenshtein_ratio class PlayerError(Exception): @@ -151,21 +150,14 @@ class PlayerClient(Player): matching_artists.append(fuzz_art) self.log.debug('"%s" matches "%s".' % (fuzz_art, artist)) return matching_artists - # Proceed with levenshtein and SimaStr - leven = levenshtein_ratio(artist.stripped.lower(), - SimaStr(fuzz_art).stripped.lower()) - # SimaStr string __eq__, not regular string comparison here + # SimaStr string __eq__ (not regular string comparison here) if artist == fuzz_art: matching_artists.append(fuzz_art) self.log.info('"%s" quite probably matches "%s" (SimaStr)' % (fuzz_art, artist)) - elif leven >= 0.82: # PARAM - matching_artists.append(fuzz_art) - self.log.debug('FZZZ: "%s" should match "%s" (lr=%1.3f)' % - (fuzz_art, artist, leven)) else: - self.log.debug('FZZZ: "%s" does not match "%s" (lr=%1.3f)' % - (fuzz_art, artist, leven)) + self.log.debug('FZZZ: "%s" does not match "%s"' % + (fuzz_art, artist)) return matching_artists def find_album(self, artist, album):