invidious
invidious copied to clipboard
[Enhancement] Captions: automatically fallback to transcripts workaround when request fails
Is your enhancement request related to a problem? Please describe.
On public instances the traditional endpoint for fetching captions is rate-limited meaning that videos cannot display any subtitles.
A workaround was added in #4001 but as it requires a configuration change (due to the potential differing results) this feature is still not widely adopted on public instances.
Describe the solution you'd like
We should consider automatically falling back to this workaround when captions are unable to be fetched due to a rate-limit.
Describe alternatives you've considered
Don't automatically fallback.
Additional context
The other way around is to require all the public instances to use it.
That's something possible.
Not sure how long YouTube's rate limit lasts but after the instance has hit the rate limit once, it's probably a good idea to remember that it is rate limited for a while. Then it can just directly use the fallback, which will be faster because the instance won't be making requests that will definitely fail and will only result in the rate limit getting extended.