]> kaliko git repositories - mpd-sima.git/commitdiff
MPD client: Remove useless check on use_mbid
authorkaliko <kaliko@azylum.org>
Thu, 6 May 2021 09:32:29 +0000 (11:32 +0200)
committerkaliko <kaliko@azylum.org>
Fri, 7 May 2021 16:27:45 +0000 (18:27 +0200)
sima/mpdclient.py

index bccdb97c7f83790e7541c0765cfe567b72ad724f..1ad5100e9ea7ce8a6bdb7fe961d02c5b2cd5dc31 100644 (file)
@@ -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: