fix typo
authorMarcel van der Veldt <m.vanderveldt@outlook.com>
Thu, 3 Aug 2023 08:27:14 +0000 (10:27 +0200)
committerMarcel van der Veldt <m.vanderveldt@outlook.com>
Thu, 3 Aug 2023 08:27:14 +0000 (10:27 +0200)
music_assistant/server/controllers/media/albums.py
music_assistant/server/controllers/media/artists.py
music_assistant/server/controllers/media/playlists.py
music_assistant/server/controllers/media/radio.py
music_assistant/server/controllers/media/tracks.py

index e16b9a27d1311ffc2e4231b4428513a8352d17cc..2d7dc83e36fa279fe043ae80f1e01ec3fd267889 100644 (file)
@@ -100,14 +100,14 @@ class AlbumsController(MediaControllerBase[Album]):
         if not item.provider_mappings:
             raise InvalidDataError("Album is missing provider mapping(s)")
         # grab additional metadata
-        if not metadata_lookup:
+        if metadata_lookup:
             await self.mass.metadata.get_album_metadata(item)
         # actually add (or update) the item in the library db
         # use the lock to prevent a race condition of the same item being added twice
         async with self._db_add_lock:
             library_item = await self._add_library_item(item)
         # also fetch the same album on all providers
-        if not metadata_lookup:
+        if metadata_lookup:
             await self._match(library_item)
             library_item = await self.get_library_item(library_item.item_id)
         # also add album tracks
index 7393a00c95f9274e9289eb1542d2be0c2dc1aaa9..dca0b5c7f383e831dcb03028ac0db432c8ae20a4 100644 (file)
@@ -64,14 +64,14 @@ class ArtistsController(MediaControllerBase[Artist]):
         if isinstance(item, ItemMapping):
             metadata_lookup = True
         # grab musicbrainz id and additional metadata
-        if not metadata_lookup:
+        if metadata_lookup:
             await self.mass.metadata.get_artist_metadata(item)
         # actually add (or update) the item in the library db
         # use the lock to prevent a race condition of the same item being added twice
         async with self._db_add_lock:
             library_item = await self._add_library_item(item)
         # also fetch same artist on all providers
-        if not metadata_lookup:
+        if metadata_lookup:
             await self.match_artist(library_item)
             library_item = await self.get_library_item(library_item.item_id)
         self.mass.signal_event(
index aa4d3e6c661af871afbcec344d8c73ff01d28f66..083c4d2e7542ef581d0809c8a21ff727ec22617d 100644 (file)
@@ -70,7 +70,7 @@ class PlaylistController(MediaControllerBase[Playlist]):
         async for _ in self.tracks(item.item_id, item.provider):
             pass
         # metadata lookup we need to do after adding it to the db
-        if not metadata_lookup:
+        if metadata_lookup:
             await self.mass.metadata.get_playlist_metadata(library_item)
             library_item = await self.update_item_in_library(library_item.item_id, library_item)
         self.mass.signal_event(
index 5180c772438cd26770bd781e8762a7eaf592dfc8..880961e83cd15868855bc0d2445185c3c88c38fe 100644 (file)
@@ -68,7 +68,7 @@ class RadioController(MediaControllerBase[Radio]):
             raise InvalidDataError("Not a valid Radio object (ItemMapping can not be added to db)")
         if not item.provider_mappings:
             raise InvalidDataError("Radio is missing provider mapping(s)")
-        if not metadata_lookup:
+        if metadata_lookup:
             await self.mass.metadata.get_radio_metadata(item)
         # actually add (or update) the item in the library db
         # use the lock to prevent a race condition of the same item being added twice
index a5d8a8f91e552df421dbf5275082ec2ab649338e..b81f9301914edfbff3bc4b60e72806f1b5179f50 100644 (file)
@@ -128,7 +128,7 @@ class TracksController(MediaControllerBase[Track]):
         if not item.provider_mappings:
             raise InvalidDataError("Track is missing provider mapping(s)")
         # grab additional metadata
-        if not metadata_lookup:
+        if metadata_lookup:
             await self.mass.metadata.get_track_metadata(item)
         # fallback track image from album (only if albumtype = single)
         if (
@@ -145,7 +145,7 @@ class TracksController(MediaControllerBase[Track]):
         async with self._db_add_lock:
             library_item = await self._add_library_item(item)
         # also fetch same track on all providers (will also get other quality versions)
-        if not metadata_lookup:
+        if metadata_lookup:
             await self._match(library_item)
             library_item = await self.get_library_item(library_item.item_id)
         self.mass.signal_event(