Skip to content

Commit

Permalink
fix regex for new spotify links (#74)
Browse files Browse the repository at this point in the history
  • Loading branch information
topi314 authored Jun 3, 2023
1 parent 349dfb1 commit cc6f3f7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,8 @@ plugins:
* https://open.spotify.com/playlist/7HAO9R9v203gkaPAgknOMp
* https://open.spotify.com/artist/3ZztVuWxHzNpl0THurTFCv

(including new regional links like https://open.spotify.com/intl-de/track/0eG08cBeKk0mzykKjw4hcQ)

### Apple Music
* `amsearch:animals architects`
* https://music.apple.com/cy/album/animals/1533388849?i=1533388859
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

public class SpotifySourceManager extends MirroringAudioSourceManager implements HttpConfigurable {

public static final Pattern URL_PATTERN = Pattern.compile("(https?://)?(www\\.)?open\\.spotify\\.com/(user/[a-zA-Z0-9-_]+/)?(?<type>track|album|playlist|artist)/(?<identifier>[a-zA-Z0-9-_]+)");
public static final Pattern URL_PATTERN = Pattern.compile("(https?://)(www\\.)?open\\.spotify\\.com/((?<region>[a-zA-Z-]+)/)?(user/(?<user>[a-zA-Z0-9-_]+)/)?(?<type>track|album|playlist|artist)/(?<identifier>[a-zA-Z0-9-_]+)");
public static final String SEARCH_PREFIX = "spsearch:";
public static final String RECOMMENDATIONS_PREFIX = "sprec:";
public static final int PLAYLIST_MAX_PAGE_ITEMS = 100;
Expand Down

0 comments on commit cc6f3f7

Please sign in to comment.