[soundcloud] Reduce pagination limit to fix 502 Bad Gateway errors when listing a user's tracks. #26557
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Please follow the guide below
x
into all the boxes [ ] relevant to your pull request (like that [x])Before submitting a pull request make sure you have:
In order to be accepted and merged into youtube-dl each piece of code must be in public domain or released under Unlicense. Check one of the following options:
What is the purpose of your pull request?
Description of your pull request and other information
Per the documentation here https://developers.soundcloud.com/blog/offset-pagination-deprecated the maximum limit value is actually 200, however 2000 seems to work fine. The exact upper limit I found experimentally was 2847 (anything above the returns a 502 Bad Gateway error). I figured 2000 would provide some leeway in case the actual limit comes down again.
This limit was previously modified by b334732 after many users reported the 502 errors back in May. It seems to have cropped up again, and reducing the limit further seems to fix the problem. @remitamine might be interested in this since they merged in the last fix.
Before:
After:
edit: Reduced limit to 200 to match SoundCloud's documentation.