From 4af7c6a365f7d2045344cb6f265c247913a90cda Mon Sep 17 00:00:00 2001 From: reaitten <reaitten@protonmail.com> Date: Wed, 14 Sep 2022 19:12:21 -0400 Subject: [PATCH] fix: multiple "600" in original cover URL filename - Fixes a minor issue when trying to set a Qobuz original cover URL. Streamrip replaces all occurrences of `600` when setting `cover_urls["original"]` which leads to raising an error when downloading the cover art for this album: https://www.qobuz.com/no-en/album/swan-alexandros/0060040678390 --- streamrip/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/streamrip/utils.py b/streamrip/utils.py index 6f34539..b409402 100644 --- a/streamrip/utils.py +++ b/streamrip/utils.py @@ -318,7 +318,7 @@ def get_cover_urls(resp: dict, source: str) -> Optional[dict]: if source == "qobuz": cover_urls = resp["image"] - cover_urls["original"] = cover_urls["large"].replace("600", "org") + cover_urls["original"] = "org".join(cover_urls["large"].rsplit('600', 1)) return cover_urls if source == "tidal":