skip matching on unique/file providers as it is pointless
authorMarcel van der Veldt <m.vanderveldt@outlook.com>
Wed, 5 Apr 2023 14:27:38 +0000 (16:27 +0200)
committerMarcel van der Veldt <m.vanderveldt@outlook.com>
Wed, 5 Apr 2023 14:27:38 +0000 (16:27 +0200)
music_assistant/server/controllers/media/albums.py
music_assistant/server/controllers/media/artists.py
music_assistant/server/controllers/media/tracks.py

index 3bb2448e8e567ffa70dd268b9381b39e151b5c94..e2c23b0a1f4824d4f9583c1b1731846c388b4266 100644 (file)
@@ -429,6 +429,9 @@ class AlbumsController(MediaControllerBase[Album]):
                 continue
             if ProviderFeature.SEARCH not in provider.supported_features:
                 continue
+            if provider.is_unique:
+                # matching on unique provider sis pointless as they push (all) their content to MA
+                continue
             if await find_prov_match(provider):
                 cur_provider_domains.add(provider.domain)
             else:
index cd0f25fb96c73500a52dfd2ad3eb2b8dd66bad83..e8458636159f570b6b187edd6eab80ebb9c1bf31 100644 (file)
@@ -196,6 +196,9 @@ class ArtistsController(MediaControllerBase[Artist]):
                 continue
             if ProviderFeature.SEARCH not in provider.supported_features:
                 continue
+            if provider.is_unique:
+                # matching on unique provider sis pointless as they push (all) their content to MA
+                continue
             if await self._match(db_artist, provider):
                 cur_provider_domains.add(provider.domain)
             else:
index d1eecaf528ef196a1bd8f468adc24e80bdd548be..fdbb1fdd8777ff015651b90236a5be48db621d8d 100644 (file)
@@ -212,6 +212,9 @@ class TracksController(MediaControllerBase[Track]):
         for provider in self.mass.music.providers:
             if ProviderFeature.SEARCH not in provider.supported_features:
                 continue
+            if provider.is_unique:
+                # matching on unique provider sis pointless as they push (all) their content to MA
+                continue
             self.logger.debug(
                 "Trying to match track %s on provider %s", db_track.name, provider.name
             )