OpenInApp: Add support for localization in Spotify URL regex (#2776)
This commit is contained in:
parent
e07a4e19e6
commit
b595a3e33c
1 changed files with 1 additions and 1 deletions
|
@ -33,7 +33,7 @@ interface URLReplacementRule {
|
|||
// Do not forget to add protocols to the ALLOWED_PROTOCOLS constant
|
||||
const UrlReplacementRules: Record<string, URLReplacementRule> = {
|
||||
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\/.+$/,
|
||||
|
|
Loading…
Reference in a new issue