Skip to content

Commit 45bb646

Browse files
committed
[SoundCloud] Do not overwrite nextPageUrl in PlaylistExtractor
Consistent with YouTube and the documentation
1 parent c505d4e commit 45bb646

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

extractor/src/main/java/org/schabi/newpipe/extractor/services/soundcloud/SoundcloudPlaylistExtractor.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -169,14 +169,14 @@ public InfoItemsPage<StreamInfoItem> getPage(String pageUrl) throws IOException,
169169
+ "&ids=").length();
170170
final int lengthOfEveryStream = 11;
171171

172-
String currentPageUrl;
172+
String currentPageUrl, nextUrl;
173173
int lengthMaxStreams = lengthFirstPartOfUrl + lengthOfEveryStream * streamsPerRequestedPage;
174174
if (pageUrl.length() <= lengthMaxStreams) {
175175
currentPageUrl = pageUrl; // fetch every remaining video, there are less than the max
176-
nextPageUrl = ""; // afterwards the list is complete
176+
nextUrl = ""; // afterwards the list is complete
177177
} else {
178178
currentPageUrl = pageUrl.substring(0, lengthMaxStreams);
179-
nextPageUrl = pageUrl.substring(0, lengthFirstPartOfUrl) + pageUrl.substring(lengthMaxStreams);
179+
nextUrl = pageUrl.substring(0, lengthFirstPartOfUrl) + pageUrl.substring(lengthMaxStreams);
180180
}
181181

182182
StreamInfoItemsCollector collector = new StreamInfoItemsCollector(getServiceId());
@@ -193,6 +193,6 @@ public InfoItemsPage<StreamInfoItem> getPage(String pageUrl) throws IOException,
193193
throw new ParsingException("Could not parse json response", e);
194194
}
195195

196-
return new InfoItemsPage<>(collector, nextPageUrl);
196+
return new InfoItemsPage<>(collector, nextUrl);
197197
}
198198
}

0 commit comments

Comments
 (0)