Skip to content

Fix SoundCloud channel tab pagination looping on empty pages#1387

Merged
TobiGr merged 3 commits intoTeamNewPipe:devfrom
that1potato:issue#12251
Oct 15, 2025
Merged

Fix SoundCloud channel tab pagination looping on empty pages#1387
TobiGr merged 3 commits intoTeamNewPipe:devfrom
that1potato:issue#12251

Conversation

@that1potato
Copy link
Copy Markdown
Contributor

@that1potato that1potato commented Oct 11, 2025

  • I carefully read the contribution guidelines and agree to them.
  • I have tested the API against NewPipe.
  • I agree to create a pull request for NewPipe as soon as possible to make it compatible with the changed API.

This PR fixes #12251 in the NewPipe repo.

Summary

  • Stop returning paginated SoundCloud track pages that contain no items by looping client-side until we either collect results or exhaust safe guards (extractor/src/main/java/org/schabi/newpipe/extractor/services/soundcloud/extractors/SoundcloudChannelTabExtractor.java:76).
  • Track visited URLs and cap empty responses to avoid infinite pagination loops while still surfacing valid nextPage tokens (SoundcloudChannelTabExtractor.java:77, SoundcloudChannelTabExtractor.java:100).

Testing

  • Built the NewPipe app via composite build against this extractor, solved the infinite loading bug mentioned in the issue (tested on emulated Pixel 9, API 36, app version v0.28.0).
Screenshot 2025-10-11 at 1 14 42 pm

@TobiGr TobiGr added bug Issue or PR is related to a bug SoundCloud Service, https://soundcloud.com/ labels Oct 11, 2025
@TobiGr
Copy link
Copy Markdown
Contributor

TobiGr commented Oct 11, 2025

Hello and thank you for your contribution. Is it part of the yearly ANU comp2120 OSS assignement?

Copy link
Copy Markdown
Contributor

@TobiGr TobiGr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes look good to me and are easy to understand thanks to the detailed PR description. Well done!

I added a test to check that everything is working. I'd usually ask you to do this, but we are currently having a problem with single test exectuion in SoundCloud. The tests are recorded as described in our docs.

@TobiGr TobiGr self-assigned this Oct 11, 2025
@TobiGr
Copy link
Copy Markdown
Contributor

TobiGr commented Oct 14, 2025

Thank you for the changes. Please do the following:

  1. Fix the checkstyle error which you can see in the CI log
  2. Squash, reorder and reword your commits into a single one and put my commit on top of that.

After that we are good to go!

that1potato and others added 3 commits October 15, 2025 11:53
Style fix: remove trailing space at line 28

Update MAX_EMPTY_PAGES value to 3 with proper JDoc formatting

Add JavaDoc for MAX_EMPTY_PAGES

Rewite getPage method to internally handle emptyItems case
gradle :extractor:test --tests "org.schabi.newpipe.extractor.services.soundcloud.SoundcloudChannelTabExtractorTest$NoEmptyNextPages" -Ddownloader=RECORDING
@that1potato
Copy link
Copy Markdown
Contributor Author

Hey Tobi, I have fixed the checkstyle error and squashed and reordered the commits.

Copy link
Copy Markdown
Contributor

@TobiGr TobiGr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@TobiGr TobiGr merged commit 3af7326 into TeamNewPipe:dev Oct 15, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Issue or PR is related to a bug SoundCloud Service, https://soundcloud.com/

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[SoundCloud] Tracks tab for some artists doesn't completely load all tracks

2 participants