From b595a3e33c4a39e67a36dc9041ed2aa90c30aaea Mon Sep 17 00:00:00 2001 From: vxray <41696677+vxray@users.noreply.github.com> Date: Sun, 1 Sep 2024 05:20:22 +0200 Subject: [PATCH] OpenInApp: Add support for localization in Spotify URL regex (#2776) --- src/plugins/openInApp/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/openInApp/index.ts b/src/plugins/openInApp/index.ts index 1a68e8f5..2e332465 100644 --- a/src/plugins/openInApp/index.ts +++ b/src/plugins/openInApp/index.ts @@ -33,7 +33,7 @@ interface URLReplacementRule { // Do not forget to add protocols to the ALLOWED_PROTOCOLS constant const UrlReplacementRules: Record = { spotify: { - match: /^https:\/\/open\.spotify\.com\/(track|album|artist|playlist|user|episode)\/(.+)(?:\?.+?)?$/, + match: /^https:\/\/open\.spotify\.com\/(?:intl-[a-z]{2}\/)?(track|album|artist|playlist|user|episode)\/(.+)(?:\?.+?)?$/, replace: (_, type, id) => `spotify://${type}/${id}`, description: "Open Spotify links in the Spotify app", shortlinkMatch: /^https:\/\/spotify\.link\/.+$/,