Skip to content

Commit 17320ef

Browse files
evermind-zzStypox
authored andcommitted
searchfilters: Soundcloud give empty page if no more results
1 parent a043cbd commit 17320ef

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

extractor/src/main/java/org/schabi/newpipe/extractor/services/soundcloud/extractors/SoundcloudSearchExtractor.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,9 @@ public InfoItemsPage<InfoItem> getPage(final Page page) throws IOException,
9292
} catch (final JsonParserException e) {
9393
throw new ParsingException("Could not parse json response", e);
9494
}
95+
if (searchCollection.isEmpty()) {
96+
return InfoItemsPage.emptyPage(); // no more search results
97+
}
9598

9699
if (getOffsetFromUrl(page.getUrl()) + ITEMS_PER_PAGE < totalResults) {
97100
return new InfoItemsPage<>(collectItems(searchCollection),

0 commit comments

Comments
 (0)