searchfilters: Soundcloud give empty page if no more results

This commit is contained in:
evermind 2022-08-19 14:41:24 +02:00 committed by Stypox
parent a043cbdc49
commit 17320ef44e
No known key found for this signature in database
GPG Key ID: 4BDF1B40A49FDD23
1 changed files with 3 additions and 0 deletions

View File

@ -92,6 +92,9 @@ public class SoundcloudSearchExtractor extends SearchExtractor {
} catch (final JsonParserException e) {
throw new ParsingException("Could not parse json response", e);
}
if (searchCollection.isEmpty()) {
return InfoItemsPage.emptyPage(); // no more search results
}
if (getOffsetFromUrl(page.getUrl()) + ITEMS_PER_PAGE < totalResults) {
return new InfoItemsPage<>(collectItems(searchCollection),