[SoundCloud] Fix certain playlists showing as empty

This commit is contained in:
petlyh 2023-04-13 12:32:00 +02:00
parent 7dba6e3891
commit 3be2d19f3a
No known key found for this signature in database
GPG Key ID: 0E7BACA438DF2505
1 changed files with 9 additions and 0 deletions

View File

@ -141,6 +141,15 @@ public class SoundcloudPlaylistExtractor extends PlaylistExtractor {
}
});
// extract using getPage if no tracks were collected and playlist is not empty
if (streamInfoItemsCollector.getItems().isEmpty() && !ids.isEmpty()) {
try {
return getPage(new Page(ids));
} catch (final IOException | ExtractionException e) {
return new InfoItemsPage<>(streamInfoItemsCollector, null);
}
}
return new InfoItemsPage<>(streamInfoItemsCollector, new Page(ids));
}