From: kaliko Date: Thu, 6 May 2021 09:32:29 +0000 (+0200) Subject: MPD client: Remove useless check on use_mbid X-Git-Tag: 0.18.0~57 X-Git-Url: https://git.kaliko.me/?a=commitdiff_plain;h=5de446a3d7e67a95afa7cff1c9c12642daeaf8ce;p=mpd-sima.git MPD client: Remove useless check on use_mbid --- diff --git a/sima/mpdclient.py b/sima/mpdclient.py index bccdb97..1ad5100 100644 --- a/sima/mpdclient.py +++ b/sima/mpdclient.py @@ -353,11 +353,11 @@ class MPD(MPDClient): if not hasattr(album, 'artist'): raise PlayerError('Album object have no artist attribute') albums = [] - if self.use_mbid and album.mbid: + if album.mbid: filt = f"(MUSICBRAINZ_ALBUMID == '{album.mbid}')" albums = self.find(filt) # Now look for album with no MusicBrainzIdentifier - if not albums and album.artist.mbid and self.use_mbid: # Use album artist MBID if possible + if not albums and album.artist.mbid: # Use album artist MBID if possible filt = f"((MUSICBRAINZ_ALBUMARTISTID == '{album.artist.mbid}') AND (album == '{album.name_sz}'))" albums = self.find(filt) if not albums: # Falls back to (album)?artist/album name @@ -382,7 +382,7 @@ class MPD(MPDClient): Returns an Artist object """ found = False - if self.use_mbid and artist.mbid: + if artist.mbid: # look for exact search w/ musicbrainz_artistid library = self.list('artist', f"(MUSICBRAINZ_ARTISTID == '{artist.mbid}')") if library: