diff --git a/src/config/constants.ts b/src/config/constants.ts index 750a7f6..fe9616b 100644 --- a/src/config/constants.ts +++ b/src/config/constants.ts @@ -1,8 +1,9 @@ export const SPOTIFY_LINK_REGEX = - /^https:\/\/(open\.spotify\.com\/(track|album|playlist|artist|episode|show)|spotify\.link)\/[^?#]+/; + /^https:\/\/(open\.spotify\.com\/(track|album|playlist|artist|episode|show)|spotify\.link)\/[^/?]+/; export const SPOTIFY_LINK_MOBILE_REGEX = /^https:\/\/spotify\.link\/.*$/; -export const SPOTIFY_LINK_DESKTOP_REGEX = /https:\/\/open\.spotify\.com\/[^?]+/; +export const SPOTIFY_LINK_DESKTOP_REGEX = + /(https:\/\/open\.spotify\.com\/(track|album|playlist|artist|episode|show)\/[^/?]+)/; export const SPOTIFY_ID_REGEX = /(?<=\/(track|album|playlist|artist|episode|show)\/)[^/?]+/;