Skip to content

Commit

Permalink
Added fixes from issue sedmelluq#650 pull request from original repo
Browse files Browse the repository at this point in the history
  • Loading branch information
Jjmarco committed Oct 2, 2021
1 parent 707771a commit a99e186
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,8 @@ public List<JsonBrowser> readPlaylistTracks(JsonBrowser playlistData) {

protected JsonBrowser findEntryOfKind(JsonBrowser data, String kind) {
for (JsonBrowser value : data.values()) {
for (JsonBrowser entry : value.get("data").values()) {
if (entry.isMap() && kind.equals(entry.get("kind").text())) {
return entry;
}
}
if (value.isMap() && kind.equals(value.get("data").get("kind").safeText())) {
return value.get("data");
}

return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ public class DefaultSoundCloudHtmlDataLoader implements SoundCloudHtmlDataLoader
private static final Logger log = LoggerFactory.getLogger(DefaultSoundCloudHtmlDataLoader.class);

private static final TextRange[] JSON_RANGES = {
new TextRange("window.__sc_hydration = ", ";</script>"),
new TextRange("catch(e){}})},", ");</script>"),
new TextRange("){}})},", ");</script>")
};
Expand Down

0 comments on commit a99e186

Please sign in to comment.