Skip to content

Commit

Permalink
Merge pull request #50 from Devoxin/original
Browse files Browse the repository at this point in the history
Fix YouTube searching.
  • Loading branch information
Walkyst authored May 25, 2022
2 parents 67bfdc4 + bded96a commit f344857
Showing 1 changed file with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,15 @@ private List<AudioTrack> extractSearchPage(JsonBrowser jsonBrowser, Function<Aud
jsonBrowser.get("contents")
.get("sectionListRenderer")
.get("contents")
.index(0)
.get("itemSectionRenderer")
.get("contents")
.values()
.forEach(jsonTrack -> {
AudioTrack track = extractPolymerData(jsonTrack, trackFactory);
if (track != null) list.add(track);
});
.values() // .index(0)
.forEach(content -> content.get("itemSectionRenderer")
.get("contents")
.values()
.forEach(jsonTrack -> {
AudioTrack track = extractPolymerData(jsonTrack, trackFactory);
if (track != null) list.add(track);
})
);
return list;
}

Expand Down

0 comments on commit f344857

Please sign in to comment.