X-Git-Url: https://git.kaliko.me/?a=blobdiff_plain;f=sima%2Fmpdclient.py;h=5c32b775feb9906c6317e44172db3cb9838655ea;hb=d1650da737a01f0c480ffe8035fb56051e3cef1d;hp=0d0ff1e4d4ddd2d87651e84cfc5b1969248dc555;hpb=e4dc436d9891dd6f7b80c8d60d45bbc39b7c67d3;p=mpd-sima.git diff --git a/sima/mpdclient.py b/sima/mpdclient.py index 0d0ff1e..5c32b77 100644 --- a/sima/mpdclient.py +++ b/sima/mpdclient.py @@ -33,7 +33,7 @@ from .utils.leven import levenshtein_ratio class PlayerError(Exception): - """Fatal error in poller.""" + """Fatal error in the player.""" # Some decorators @@ -390,8 +390,11 @@ class MPD(MPDClient): if len(library) > 1: self.log.debug('I got "%s" searching for %r', library, artist) elif len(library) == 1 and library[0] != artist.name: + new_alias = artist.name self.log.info('Update artist name %s->%s', artist, library[0]) + self.log.debug('Also add alias for %s: %s', artist, new_alias) artist = Artist(name=library[0], mbid=artist.mbid) + artist.add_alias(new_alias) # Fetches remaining artists for potential match artists = self._cache['nombid_artists'] else: # not using MusicBrainzIDs @@ -474,7 +477,7 @@ class MPD(MPDClient): looking for albums for Artist_B returns wrongly this album. """ # First, look for all potential albums - self.log.debug('Searching album for "%s"', artist) + self.log.debug('Searching album for "%r"', artist) if artist.aliases: self.log.debug('Searching album for %s aliases: "%s"', artist, artist.aliases)