1.4.1
authorMarcel van der Veldt <m.vanderveldt@outlook.com>
Thu, 16 Jun 2022 23:54:24 +0000 (01:54 +0200)
committerMarcel van der Veldt <m.vanderveldt@outlook.com>
Thu, 16 Jun 2022 23:54:24 +0000 (01:54 +0200)
music_assistant/music_providers/spotify.py
setup.py

index 268b8a816a393477bdf7ea9d031ec55fa149b859..5f019536cde0e797f87f46333902f15d3ba60a43 100644 (file)
@@ -555,7 +555,9 @@ class SpotifyProvider(MusicProvider):
             result = json.loads(stdout)
         except JSONDecodeError:
             self.logger.warning(
-                "Error while retrieving Spotify token, details: %s", stdout
+                "Error while retrieving Spotify token, using libraspot: %s details: %s",
+                librespot,
+                stdout,
             )
             return None
         # transform token info to spotipy compatible format
@@ -658,10 +660,14 @@ class SpotifyProvider(MusicProvider):
         async def check_librespot(librespot_path: str) -> str | None:
             try:
                 librespot = await asyncio.create_subprocess_exec(
-                    *[librespot_path, "-V"], stdout=asyncio.subprocess.PIPE
+                    *[librespot_path, "--check"], stdout=asyncio.subprocess.PIPE
                 )
                 stdout, _ = await librespot.communicate()
-                if librespot.returncode == 0 and b"librespot" in stdout:
+                if (
+                    librespot.returncode == 0
+                    and b"ok spotty" in stdout
+                    and b"using librespot" in stdout
+                ):
                     self._librespot_bin = librespot_path
                     return librespot_path
             except OSError:
index d2e6bfda17aa2e747aceaa0ca0403507eb185ad8..2040ce51a3225984bb3c54cd18176873b82a7ff4 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -6,7 +6,7 @@ from setuptools import find_packages, setup
 
 PROJECT_NAME = "Music Assistant"
 PROJECT_PACKAGE_NAME = "music_assistant"
-PROJECT_VERSION = "1.4.0"
+PROJECT_VERSION = "1.4.1"
 PROJECT_REQ_PYTHON_VERSION = "3.9"
 PROJECT_LICENSE = "Apache License 2.0"
 PROJECT_AUTHOR = "Marcel van der Veldt"