From 0e813e78d0c55d06f5062312d4aea3db01d0cc97 Mon Sep 17 00:00:00 2001 From: fae <752642+faejr@users.noreply.github.com> Date: Mon, 30 Dec 2024 03:24:29 +0100 Subject: [PATCH] OpenInApp: Add support for geo.music.apple.com links (#3101) --- 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 2d27c2b20..09fc2f3b7 100644 --- a/src/plugins/openInApp/index.ts +++ b/src/plugins/openInApp/index.ts @@ -57,7 +57,7 @@ const UrlReplacementRules: Record = { description: "Open Tidal links in the Tidal app", }, itunes: { - match: /^https:\/\/music\.apple\.com\/([a-z]{2}\/)?(album|artist|playlist|song|curator)\/([^/?#]+)\/?([^/?#]+)?(?:\?.*)?(?:#.*)?$/, + match: /^https:\/\/(?:geo\.)?music\.apple\.com\/([a-z]{2}\/)?(album|artist|playlist|song|curator)\/([^/?#]+)\/?([^/?#]+)?(?:\?.*)?(?:#.*)?$/, replace: (_, lang, type, name, id) => id ? `itunes://music.apple.com/us/${type}/${name}/${id}` : `itunes://music.apple.com/us/${type}/${name}`, description: "Open Apple Music links in the iTunes app" },