Skip to content

Commit

Permalink
Fixed partially URL encoded URLs not matching regular expressions (#248)
Browse files Browse the repository at this point in the history
Update URL patterns so that URL encoded URLs match regular expressions.
  • Loading branch information
Dev6050 authored Jan 18, 2025
1 parent 3112a3d commit d9dcbc8
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@

public class AppleMusicSourceManager extends MirroringAudioSourceManager implements AudioSearchManager {

public static final Pattern URL_PATTERN = Pattern.compile("(https?://)?(www\\.)?music\\.apple\\.com/((?<countrycode>[a-zA-Z]{2})/)?(?<type>album|playlist|artist|song)(/[a-zA-Z\\p{L}\\d\\-]+)?/(?<identifier>[a-zA-Z\\d\\-.]+)(\\?i=(?<identifier2>\\d+))?");
public static final Pattern URL_PATTERN = Pattern.compile("(https?://)?(www\\.)?music\\.apple\\.com/((?<countrycode>[a-zA-Z]{2})/)?(?<type>album|playlist|artist|song)(/[a-zA-Z\\p{L}\\d\\-%]+)?/(?<identifier>[a-zA-Z\\d\\-.]+)(\\?i=(?<identifier2>\\d+))?");
public static final String SEARCH_PREFIX = "amsearch:";
public static final String PREVIEW_PREFIX = "amprev:";
public static final long PREVIEW_LENGTH = 30000;
Expand Down

0 comments on commit d9dcbc8

Please sign in to comment.