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
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:
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"