From a937f7bbb16f1bbab6c9033f351641100509d469 Mon Sep 17 00:00:00 2001 From: Marcel van der Veldt Date: Fri, 17 Jun 2022 01:54:24 +0200 Subject: [PATCH] 1.4.1 --- music_assistant/music_providers/spotify.py | 12 +++++++++--- setup.py | 2 +- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/music_assistant/music_providers/spotify.py b/music_assistant/music_providers/spotify.py index 268b8a81..5f019536 100644 --- a/music_assistant/music_providers/spotify.py +++ b/music_assistant/music_providers/spotify.py @@ -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: diff --git a/setup.py b/setup.py index d2e6bfda..2040ce51 100644 --- 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" -- 2.34.1