[Deezer] Fix sync album if no cover image (#863)
authorJonathan Bangert <jonathan@bangert.dk>
Fri, 27 Oct 2023 09:22:51 +0000 (11:22 +0200)
committerGitHub <noreply@github.com>
Fri, 27 Oct 2023 09:22:51 +0000 (11:22 +0200)
* Fix sync album if no cover image

* Update deezer-python version

music_assistant/server/providers/deezer/__init__.py
music_assistant/server/providers/deezer/manifest.json
requirements_all.txt

index 9928e985af5d889900310bdfe04315ee5cba2a79..a1e3335c42645096099443a1d09b4658d1eaad47 100644 (file)
@@ -159,7 +159,7 @@ class DeezerProvider(MusicProvider):  # pylint: disable=W0223
     client: deezer.Client
     gw_client: GWClient
     creds: DeezerCredentials
-    user: deezer.resources.User
+    user: deezer.User
 
     async def handle_setup(self) -> None:
         """Set up the Deezer provider."""
@@ -485,7 +485,7 @@ class DeezerProvider(MusicProvider):  # pylint: disable=W0223
             metadata.popularity = track.rank
         if hasattr(track, "release_date"):
             metadata.release_date = track.release_date
-        if hasattr(track, "album"):
+        if hasattr(track, "album") and hasattr(track.album, "cover_big"):
             metadata.images = [
                 MediaItemImage(
                     type=ImageType.THUMB,
index 128cb615632e55add2fcc363ad509d6c35aee889..e0d4f10b847d846c8e0e425baf0cfecbdb8b5d9d 100644 (file)
@@ -5,6 +5,6 @@
   "description": "Support for the Deezer streaming provider in Music Assistant.",
   "codeowners": ["@Un10ck3d",  "@micha91"],
   "documentation": "https://github.com/orgs/music-assistant/discussions/1245",
-  "requirements": ["git+https://github.com/music-assistant/deezer-python-async@v0.1.1", "pycryptodome==3.18.0"],
+  "requirements": ["git+https://github.com/music-assistant/deezer-python-async@v0.1.2", "pycryptodome==3.18.0"],
   "multi_instance": true
 }
index 4853387383560c185283377e3b3b2de58a8c8754..eb5cb4c85255e4fe46ab5a503e4bdfdccb42062f 100644 (file)
@@ -14,7 +14,7 @@ cryptography==41.0.3
 faust-cchardet>=2.1.18
 git+https://github.com/MarvinSchenkel/pytube.git
 git+https://github.com/gieljnssns/python-radios.git@main
-git+https://github.com/music-assistant/deezer-python-async@v0.1.1
+git+https://github.com/music-assistant/deezer-python-async@v0.1.2
 ifaddr==0.2.0
 mashumaro==3.9
 memory-tempfile==2.2.3