local API: Work around YouTube sending empty watch next responses #4626
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.
local API: Work around YouTube sending empty watch next responses
Pull Request Type
Related issue
closes #4625
Description
In draft status as this relies on LuanRT/YouTube.js#590.
YouTube has started randomly returning a watch next feed that only contains a continuation, this is similar to the empty response issue that we have on the community page (#3318, yes that pull request was 10 months ago, but the issue still exists on YouTube's side today), so the workaround is similar too.
This pull request will fetch the watch next continuation when the response is empty and there is a continuation (we can't do anything about videos that have an empty response and no continuation).
This only addresses the local API, as Invidious will need to add the workaround on their end too.
Screenshots
Testing
Test various videos and make sure that the watch next feed shows up, as the issue happens randomly you'll just have to try a few.
You'll know that the changes in this pull request came into action, when you see a second
/next
request right after the original/browse
and/next
requests (see screenshot above).Desktop