Skip to content

Commit 4935a53

Browse files
authored
set default country code if not provided in matcher (#323)
1 parent 29ed8e5 commit 4935a53

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

main/src/main/java/com/github/topi314/lavasrc/applemusic/AppleMusicSourceManager.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,9 @@ public AudioItem loadItem(String identifier, boolean preview) {
145145
}
146146

147147
var countryCode = matcher.group("countrycode");
148+
if (countryCode == null || countryCode.isEmpty()) {
149+
countryCode = this.countryCode;
150+
}
148151
var id = matcher.group("identifier");
149152
switch (matcher.group("type")) {
150153
case "song":

0 commit comments

Comments
 (0)