"""
# TODO: ain't working for "sticker find" and "sticker list"
tracks_listing = ["playlistfind", "playlistid", "playlistinfo",
"""
# TODO: ain't working for "sticker find" and "sticker list"
tracks_listing = ["playlistfind", "playlistid", "playlistinfo",
- "playlistsearch", "plchanges", "listplaylistinfo", "find",
- "search", "sticker find",]
+ "playlistsearch", "plchanges", "listplaylistinfo", "find",
+ "search", "sticker find",]
- or not hasattr(old_curr, 'id')
- or not hasattr(self.current, 'id')):
+ or not hasattr(old_curr, 'id')
+ or not hasattr(self.current, 'id')):
- self._cache = {
- 'artists': frozenset(),
- 'nombid_artists': frozenset(),
- }
+ self._cache = {'artists': frozenset(),
+ 'nombid_artists': frozenset(),}
self._cache['artists'] = frozenset(self._execute('list', ['artist']))
if Artist.use_mbid:
self._cache['nombid_artists'] = frozenset(self._execute('list', ['artist', 'musicbrainz_artistid', '']))
self._cache['artists'] = frozenset(self._execute('list', ['artist']))
if Artist.use_mbid:
self._cache['nombid_artists'] = frozenset(self._execute('list', ['artist', 'musicbrainz_artistid', '']))
- self.log.debug('found close match for "%s": %s' %
- (artist, '/'.join(match)))
+ self.log.debug('found close match for "%s": %s', artist, '/'.join(match))
# Does not perform fuzzy matching on short and single word strings
# Only lowercased comparison
if ' ' not in artist.name and len(artist.name) < 8:
# Does not perform fuzzy matching on short and single word strings
# Only lowercased comparison
if ' ' not in artist.name and len(artist.name) < 8:
- self.log.debug('title: "%s" should match "%s" (lr=%1.3f)' %
- (title_, title, leven))
+ self.log.debug('title: "%s" should match "%s" (lr=%1.3f)',
+ title_, title, leven)
- self.log.debug('title: "%s" does not match "%s" (lr=%1.3f)' %
- (title_, title, leven))
+ self.log.debug('title: "%s" does not match "%s" (lr=%1.3f)',
+ title_, title, leven)
return []
return self.find('artist', artist, 'title', title_)
return []
return self.find('artist', artist, 'title', title_)
kwalbart = {'albumartist':name, 'artist':name}
for album in self.list('album', 'albumartist', artist):
if album and album not in albums:
kwalbart = {'albumartist':name, 'artist':name}
for album in self.list('album', 'albumartist', artist):
if album and album not in albums:
for album in self.list('album', 'artist', artist):
album_trks = [trk for trk in self.find('album', album)]
if 'Various Artists' in [tr.albumartist for tr in album_trks]:
for album in self.list('album', 'artist', artist):
album_trks = [trk for trk in self.find('album', album)]
if 'Various Artists' in [tr.albumartist for tr in album_trks]:
continue
arts = set([trk.artist for trk in album_trks])
if len(set(arts)) < 2: # TODO: better heuristic, use a ratio instead
continue
arts = set([trk.artist for trk in album_trks])
if len(set(arts)) < 2: # TODO: better heuristic, use a ratio instead
albums.append(Album(name=album, **kwalbart))
elif album and album not in albums:
self.log.debug('"{0}" probably not an album of "{1}"'.format(
albums.append(Album(name=album, **kwalbart))
elif album and album not in albums:
self.log.debug('"{0}" probably not an album of "{1}"'.format(
if Artist.use_mbid:
if 'MUSICBRAINZ_ARTISTID' not in self._client.tagtypes():
self.log.warning('Use of MusicBrainzIdentifier is set but MPD is '
if Artist.use_mbid:
if 'MUSICBRAINZ_ARTISTID' not in self._client.tagtypes():
self.log.warning('Use of MusicBrainzIdentifier is set but MPD is '