Skip to content

Commit

Permalink
fix: SPOTIFY_LINK_REGEX id param
Browse files Browse the repository at this point in the history
  • Loading branch information
sjdonado committed Oct 19, 2023
1 parent 480f6ca commit 76aea1c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/config/constants.ts
Original file line number Diff line number Diff line change
@@ -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)\/)[^/?]+/;

0 comments on commit 76aea1c

Please sign in to comment.