fix: add widevine request retry logic to work around ratelimits #47
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "ddirty830/OF-DL:fix-widevine-cloudflare-retry"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I've noticed every once in a while I'd received an error
Unable to parse license
on DRM'd content.I dug a little and found that the WideVine requests were getting a CloudFlare rate limit bounce back, so I've added some retry logic to the Widevine HttpUtil methods to attempt to retry when that occurs.
It's not perfect, since CloudFlare doesn't respond with a
retry-after
header in their response, so it's just arbitrary 10 second delays increasing to 20, an then 30 for subsequent retries. It'll only retry 3 times, and then throw an error.Checkout
From your project repository, check out a new branch and test the changes.