Skip to content

Commit 32e8fed

Browse files
committed
Unescape HTML entities in Bandcamp stream URLs
1 parent 9431946 commit 32e8fed

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

main/src/main/java/com/sedmelluq/discord/lavaplayer/source/bandcamp/BandcampAudioTrack.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import org.apache.commons.io.IOUtils;
1414
import org.apache.http.client.methods.CloseableHttpResponse;
1515
import org.apache.http.client.methods.HttpGet;
16+
import org.jsoup.parser.Parser;
1617
import org.slf4j.Logger;
1718
import org.slf4j.LoggerFactory;
1819

@@ -62,7 +63,8 @@ private String getTrackMediaUrl(HttpInterface httpInterface) throws IOException
6263
String responseText = IOUtils.toString(response.getEntity().getContent(), StandardCharsets.UTF_8);
6364
JsonBrowser trackInfo = sourceManager.readTrackListInformation(responseText);
6465

65-
return trackInfo.get("trackinfo").index(0).get("file").get("mp3-128").text();
66+
String url = trackInfo.get("trackinfo").index(0).get("file").get("mp3-128").text();
67+
return url != null ? Parser.unescapeEntities(url, false) : null;
6668
}
6769
}
6870

0 commit comments

Comments
 (0)