Fix add to Tidal Library (#1309)
authorJozef Kruszynski <60214390+jozefKruszynski@users.noreply.github.com>
Wed, 15 May 2024 05:57:48 +0000 (07:57 +0200)
committerGitHub <noreply@github.com>
Wed, 15 May 2024 05:57:48 +0000 (07:57 +0200)
music_assistant/server/providers/tidal/helpers.py

index b933ede4e39c154a093590052a3c3d4754aac119..035afd23be9ec562cefa6cb82c19109148ea71d2 100644 (file)
@@ -23,7 +23,10 @@ from tidalapi import UserPlaylist as TidalUserPlaylist
 from tidalapi.exceptions import MetadataNotAvailable, ObjectNotFound, TooManyRequests
 
 from music_assistant.common.models.enums import MediaType
-from music_assistant.common.models.errors import MediaNotFoundError, ResourceTemporarilyUnavailable
+from music_assistant.common.models.errors import (
+    MediaNotFoundError,
+    ResourceTemporarilyUnavailable,
+)
 
 DEFAULT_LIMIT = 50
 LOGGER = logging.getLogger(__name__)
@@ -54,7 +57,7 @@ async def library_items_add_remove(
 
     def inner() -> bool:
         tidal_favorites = TidalFavorites(session, user_id)
-        if MediaType.UNKNOWN:
+        if media_type == MediaType.UNKNOWN:
             return False
         response: bool = False
         if add: