-
Notifications
You must be signed in to change notification settings - Fork 422
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SoundCloud] Detect whether there are any more search results #1081
Conversation
25718ae
to
428a1ec
Compare
Add test for this edge case.
428a1ec
to
05f2588
Compare
05f2588
to
aa6c17d
Compare
...a/org/schabi/newpipe/extractor/services/soundcloud/extractors/SoundcloudSearchExtractor.java
Outdated
Show resolved
Hide resolved
@TobiGr I pushed 2947257 and changed the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A review that I didn't have the time to finish and submit.
@@ -72,8 +63,7 @@ public InfoItemsPage<CommentsInfoItem> getPage(final Page page) throws Extractio | |||
getServiceId()); | |||
|
|||
collectStreamsFrom(collector, json.getArray("collection")); | |||
|
|||
return new InfoItemsPage<>(collector, new Page(json.getString("next_href"))); | |||
return new InfoItemsPage<>(collector, new Page(json.getString("next_href", null))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You do not needed to specify a null
fallback, as that's already the default value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's right, however this is fine, too
Previously, the extractor always assumed that there was an infinite number of search results. That has caused some problems. When searching for something with only a few results, that could cause clients such as NewPipe to try to load more results without getting more and thus causing tons of requests, ultimately resulting in reCaptcha requests.