mirror of
https://github.com/TeamNewPipe/NewPipeExtractor.git
synced 2025-04-28 16:00:33 +05:30
[SoundCloud] Do not overwrite nextPageUrl in PlaylistExtractor
Consistent with YouTube and the documentation
This commit is contained in:
parent
c505d4e2b7
commit
45bb646480
@ -169,14 +169,14 @@ public class SoundcloudPlaylistExtractor extends PlaylistExtractor {
|
||||
+ "&ids=").length();
|
||||
final int lengthOfEveryStream = 11;
|
||||
|
||||
String currentPageUrl;
|
||||
String currentPageUrl, nextUrl;
|
||||
int lengthMaxStreams = lengthFirstPartOfUrl + lengthOfEveryStream * streamsPerRequestedPage;
|
||||
if (pageUrl.length() <= lengthMaxStreams) {
|
||||
currentPageUrl = pageUrl; // fetch every remaining video, there are less than the max
|
||||
nextPageUrl = ""; // afterwards the list is complete
|
||||
nextUrl = ""; // afterwards the list is complete
|
||||
} else {
|
||||
currentPageUrl = pageUrl.substring(0, lengthMaxStreams);
|
||||
nextPageUrl = pageUrl.substring(0, lengthFirstPartOfUrl) + pageUrl.substring(lengthMaxStreams);
|
||||
nextUrl = pageUrl.substring(0, lengthFirstPartOfUrl) + pageUrl.substring(lengthMaxStreams);
|
||||
}
|
||||
|
||||
StreamInfoItemsCollector collector = new StreamInfoItemsCollector(getServiceId());
|
||||
@ -193,6 +193,6 @@ public class SoundcloudPlaylistExtractor extends PlaylistExtractor {
|
||||
throw new ParsingException("Could not parse json response", e);
|
||||
}
|
||||
|
||||
return new InfoItemsPage<>(collector, nextPageUrl);
|
||||
return new InfoItemsPage<>(collector, nextUrl);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user