File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -145,7 +145,7 @@ private void computeInitialTracksAndNextIds() {
145145 }
146146
147147 private void computeAnotherNextPageUrl () throws IOException , ExtractionException {
148- if (nextTrackIdsIndex >= nextTrackIds .size ()) {
148+ if (nextTrackIds == null || nextTrackIdsIndex >= nextTrackIds .size ()) {
149149 nextPageUrl = "" ; // there are no more tracks
150150 return ;
151151 }
@@ -160,6 +160,7 @@ private void computeAnotherNextPageUrl() throws IOException, ExtractionException
160160 urlBuilder .append ("," ); // a , at the end is ok
161161 }
162162
163+ nextTrackIdsIndex = upperIndex ;
163164 nextPageUrl = urlBuilder .toString ();
164165 }
165166
Original file line number Diff line number Diff line change 77import org .schabi .newpipe .DownloaderTestImpl ;
88import org .schabi .newpipe .extractor .ListExtractor ;
99import org .schabi .newpipe .extractor .NewPipe ;
10+ import org .schabi .newpipe .extractor .exceptions .ExtractionException ;
1011import org .schabi .newpipe .extractor .playlist .PlaylistExtractor ;
1112import org .schabi .newpipe .extractor .services .BasePlaylistExtractorTest ;
1213import org .schabi .newpipe .extractor .stream .StreamInfoItem ;
1314
15+ import java .io .IOException ;
16+
1417import static org .junit .Assert .*;
1518import static org .schabi .newpipe .extractor .ExtractorAsserts .assertIsSecureUrl ;
1619import static org .schabi .newpipe .extractor .ServiceList .SoundCloud ;
@@ -70,7 +73,9 @@ public void testRelatedItems() throws Exception {
7073 }
7174
7275 @ Test
73- public void testMoreRelatedItems () {
76+ public void testMoreRelatedItems () throws Exception {
77+ defaultTestMoreItems (extractor );
78+
7479 try {
7580 defaultTestMoreItems (extractor );
7681 } catch (Throwable ignored ) {
You can’t perform that action at this time.
0 commit comments