mirror of
https://github.com/TeamNewPipe/NewPipeExtractor.git
synced 2025-04-29 00:10:35 +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();
|
+ "&ids=").length();
|
||||||
final int lengthOfEveryStream = 11;
|
final int lengthOfEveryStream = 11;
|
||||||
|
|
||||||
String currentPageUrl;
|
String currentPageUrl, nextUrl;
|
||||||
int lengthMaxStreams = lengthFirstPartOfUrl + lengthOfEveryStream * streamsPerRequestedPage;
|
int lengthMaxStreams = lengthFirstPartOfUrl + lengthOfEveryStream * streamsPerRequestedPage;
|
||||||
if (pageUrl.length() <= lengthMaxStreams) {
|
if (pageUrl.length() <= lengthMaxStreams) {
|
||||||
currentPageUrl = pageUrl; // fetch every remaining video, there are less than the max
|
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 {
|
} else {
|
||||||
currentPageUrl = pageUrl.substring(0, lengthMaxStreams);
|
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());
|
StreamInfoItemsCollector collector = new StreamInfoItemsCollector(getServiceId());
|
||||||
@ -193,6 +193,6 @@ public class SoundcloudPlaylistExtractor extends PlaylistExtractor {
|
|||||||
throw new ParsingException("Could not parse json response", e);
|
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