From 4049bea29e4afed63b61bd094e35eb2fce8d34be Mon Sep 17 00:00:00 2001 From: Phlogi Date: Sat, 23 Aug 2025 21:48:10 +0200 Subject: [PATCH] match the more flexible regexp allowing more URLs --- routes/content/bulk_add.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routes/content/bulk_add.py b/routes/content/bulk_add.py index f0480e6..b5471ea 100644 --- a/routes/content/bulk_add.py +++ b/routes/content/bulk_add.py @@ -24,7 +24,7 @@ async def bulk_add_spotify_links(request: BulkAddLinksRequest): # Assuming links are pre-filtered by the frontend, # but still handle potential errors during info retrieval or unsupported types # Extract type and ID from the link directly using regex - match = re.match(r"https://open\.spotify\.com(?:/intl-[a-z]{2})?/(track|album|playlist|artist)/([a-zA-Z0-9]+)", link) + match = re.match(r"https://open\.spotify\.com(?:/intl-[a-z]{2})?/(track|album|playlist|artist)/([a-zA-Z0-9]+)(?:\?.*)?", link) if not match: logger.warning(f"Could not parse Spotify link (unexpected format after frontend filter): {link}") failed_links.append(link)