morpheus65535 / bazarr

Bazarr is a companion application to Sonarr and Radarr. It manages and downloads subtitles based on your requirements. You define your preferences by TV show or movie and Bazarr takes care of everything for you.
https://www.bazarr.media
GNU General Public License v3.0
2.78k stars 218 forks source link

Subtitle throttling on VIP OpenSubtitles.com #2121

Closed semiviral closed 1 year ago

semiviral commented 1 year ago

Describe the bug Bazarr seems to be failing to download any (?) subtitles from opensubtitles.com, with a VIP subscribed account.

To Reproduce Steps to reproduce the behavior:

  1. Link a VIP OpenSubtitles account
  2. Search all subtitles
  3. Get throttled almost immediately

Expected behavior Downloading 1000 subtitles per day, as the OpenSubtitles API (says it) allows.

Software (please complete the following information):

Additional context I'm not 100% sure this isn't an issue with OpenSubtitles, but I really have no way of telling.

morpheus65535 commented 1 year ago

Can you try to empty config/cache directory and retry?

semiviral commented 1 year ago

Yes, I've already tried deleting it—no luck.

morpheus65535 commented 1 year ago

Did you use your username or your email? Send me your username and I'll check with them.

semiviral commented 1 year ago

It was my username: idealness5269

Thanks! Let me know if you need anything else.

morpheus65535 commented 1 year ago

I've spoke with the admin and he's going to provide a test VIP account for me to run some test. I'll get back to you once I've been able to reproduce the issue (or not).

morpheus65535 commented 1 year ago

So, I've got my test VIP account and, since yesterday, I've been able to download about 1500 subtitles without being throttled (not even once). I'm using v1.2.1-beta.19. I'm not sure what I can do other than that... :-/

albino1 commented 1 year ago

I've hit a "too many requests" error a few times with a VIP account, though I'm not sure why. Possibly with multiple searches going on simultaneously, like an upgrades process is going and then something new gets added and starts immediately searching. It doesn't happen very often though, and I'm not sure if it's related, but thought I would mention it. Also, when it happens it very clearly says in UI -> Providers -> Status that there's been too many requests.

COTMO commented 1 year ago

I have also VIP account and version.1.2.1. I believe, I have this same issue. Part of my log: Throttling opensubtitlescom for 24 hours, until 23/05/03 20:36, because of: DownloadLimitExceeded. Exception info: 'Daily download limit reached. 9 subtitles have been downloaded and -4 remaining subtitles can be downloaded. Quota will be reset in 05 hours and 23 minutes.'

morpheus65535 commented 1 year ago

@COTMO hummm that's strange... this message is built with data returned by the provider.

@opensubtitles can you share some insight here on why the API is returning those numbers?

albino1 commented 1 year ago

I just got a Too Many Requests error a bit ago, all it says related to Open Subtitles in the log is:

02/05/2023 20:05:35|INFO    |root                            |Using opensubtitles again after 20 minutes, (disabled because: ServiceUnavailable)|
02/05/2023 20:05:36|INFO    |root                            |Throttling opensubtitles for 20 minutes, until 23/05/02 20:25, because of: ServiceUnavailable. Exception info: '503'|
02/05/2023 20:05:41|INFO    |root                            |Throttling opensubtitles for 20 minutes, until 23/05/02 20:25, because of: ServiceUnavailable. Exception info: '503'|
02/05/2023 20:13:23|INFO    |root                            |Throttling opensubtitles for 3 hours, until 23/05/02 23:13, because of: TooManyRequests. Exception info: None|
morpheus65535 commented 1 year ago

@albino1 yours is related to opensubtitles.org and it's expected because the provider is globally throttling Bazarr. Nothing to worry about but consider migrating to opensubtitles.com.

opensubtitles commented 1 year ago

@albino1 I beleive this is for opensubtitles.org - which is ok. @COTMO do you have VIP on opensubtitles.com and using username and password from .com in settings? @morpheus65535 maybe it would be good to get info from here: https://opensubtitles.stoplight.io/docs/opensubtitles-api/ea912bb244ef0-user-informations what API sees and add it always with these kind of problems.

COTMO commented 1 year ago

@opensubtitles Yes I have an VIP on opensubtitles.com and of course i'm using that specific login. The VIP has been transferred from opensubtitles.org. With opensubtitles.org I never had any of these issues. I send to support of opensubtitles.com why I have this isssue. To make sure my VIP account is completly and correctly transferred. Mail support #726270.

COTMO commented 1 year ago

@morpheus65535 Can the issue be that I don't have the selection for VIP opensubtitles.com. Because when I add manually the parameter "VIP=True" in the Config.ini. Everything seems to work normal as it should. I start to see at my account in opensubtitles.com he registers the downloads from the API.

afbeelding afbeelding
morpheus65535 commented 1 year ago

@COTMO there's no VIP parameters and the manual change you made isn't doing anything. There's been a change on token validation on opensubtitles.com API yesterday. Maybe it was just enough to force an authentication and generate a new valid token.

morpheus65535 commented 1 year ago

Is this still an issue?

semiviral commented 1 year ago

I'm not sure, as I'm now receiving this error:

INFO (get_providers:303) - Throttling opensubtitlescom for 10 minutes, until 23/05/11 01:15, because of: AuthenticationError. Exception info: 'Login failed: Unauthorized'

I've checked and double checked the authentication information, as well as removing and re-adding the provider. Are there any other steps that would make sense with the above error?

morpheus65535 commented 1 year ago

@semiviral anything special with your password? Special characters?

semiviral commented 1 year ago

It does contain special characters, yes.

morpheus65535 commented 1 year ago

It does contain special characters, yes.

Can you test with something simple like letters and numbers? Just to rule out encoding issue.

semiviral commented 1 year ago

Same result with no symbols,

May 11 01:45:45 CURATOR bazarr[78989]: 2023-05-11 01:45:45,665 - root                             (7fb1197da700) :  INFO (get_providers:382) - BAZARR throttled providers have been reset.
May 11 01:46:30 CURATOR bazarr[78989]: 2023-05-11 01:46:30,774 - root                             (7fb1157d2700) :  INFO (get_providers:303) - Throttling opensubtitlescom for 10 minutes, until 23/05/11 01:56, because of: AuthenticationError. Exception info: 'Login failed: Unauthorized'
May 11 01:46:35 CURATOR bazarr[78989]: 2023-05-11 01:46:35,322 - root                             (7fb1157d2700) :  INFO (movies:107) - BAZARR All providers are throttled
COTMO commented 1 year ago

@morpheus65535 Everything works fine now.

morpheus65535 commented 1 year ago

@opensubtitles can you check out why this user isn't working as expected? idealness5269

opensubtitles commented 1 year ago

Hi

we located this use only on opensubtitles.com, he is VIP and all seems good. @semiviral can you log in successfully on www.opensubtitles.com ? If yes, then use same username and password in setting for opensubtitlescom provider. If nothing works:

I dont see any reason why it should not work. You can contact us directly at our support and we can test more (reseting your password and test directly on API...)

semiviral commented 1 year ago

I have tired the above to no success. I'll open up a support ticket with @opensubtitles and close this issue, as it seems related to their service and not Bazarr. Thanks for the help!

Cookie-Monster-Coder commented 1 year ago

I am receiving the same error as @COTMO Is there any insight on why this is happening?

morpheus65535 commented 1 year ago

I am receiving the same error as @COTMO Is there any insight on why this is happening?

Wait for next release that include a fix or switch to beta where it's fixed.

Cookie-Monster-Coder commented 1 year ago

Wait for next release that include a fix or switch to beta where it's fixed.

Sorry, I totally forgot to mention that I am on v1.2.2-beta.12. I believe that is the version that the issue is supposed to be fixed?

If so I still get this error: Throttling opensubtitlescom for 24 hours, until 23/06/08 01:48, because of: DownloadLimitExceeded. Exception info: 'Daily download limit reached. 2 subtitles have been downloaded and -2 remaining subtitles can be downloaded. Quota will be reset in 17 hours and 11 minutes.'

I have VIP, here are my current stats from opensubtitles.com

Downloads / Allowed
    16 / 1000 
First download today
    2023-06-06 23:59:59 UTC

I also have 2 instances of Bazarr running, 1 for 1080p and 1 for 4K. Added this for extra data point just in case. I get the error on both of them.

morpheus65535 commented 1 year ago

@Cookie-Monster-Coder beta.14 will include better debugging. Open your own issue with a debug log reproducing the issue once you've updated to .14.

rojosinalma commented 7 months ago

This is still happening to me, I changed my password in opensubtitlescom to a number only pw and I verified that my profile shows as VIP. The pw in opensubtitlesorg is not a numbers only pw (because the site doesnt allow me to), but that one is also getting throttled.

I also cleaned the cache folder and I still get throttled almost immediately after doing a search. I'm using v1.4.0

Here's an example of the logs:

2024-01-28 20:23:40,235 - root                             (7f515bfff700) :  INFO (signalr_client:48) - BAZARR trying to connect to Sonarr SignalR feed...
2024-01-28 20:23:40,236 - root                             (7f515b7fe700) :  INFO (signalr_client:171) - BAZARR trying to connect to Radarr SignalR feed...
2024-01-28 20:23:40,236 - root                             (7f537565c500) :  INFO (server:41) - BAZARR is started and waiting for request on http://0.0.0.0:<port>/<username>/bazarr
2024-01-28 20:23:40,372 - root                             (7f5159ffb700) :  INFO (signalr_client:196) - BAZARR SignalR client for Radarr is connected and waiting for events.
2024-01-28 20:23:40,541 - root                             (7f515bfff700) :  INFO (signalr_client:64) - BAZARR SignalR client for Sonarr is connected and waiting for events.
2024-01-28 20:25:01,891 - root                             (7f534c5f4700) :  INFO (get_providers:365) - BAZARR throttled providers have been reset.
2024-01-28 20:25:06,179 - root                             (7f5139ffb700) :  INFO (get_providers:311) - Provider opensubtitles throttle count 1 of 5, waiting 5sec and trying again
2024-01-28 20:25:26,122 - root                             (7f515a7fc700) :  INFO (get_providers:287) - Throttling opensubtitlescom for 10 minutes, until 24/01/28 20:35, because of: ProviderError. Exception info: 'Bad status code: 426'
2024-01-28 20:26:01,099 - root                             (7f515a7fc700) :  INFO (get_providers:311) - Provider opensubtitles throttle count 2 of 5, waiting 5sec and trying again
2024-01-28 20:26:38,764 - root                             (7f5139ffb700) :  INFO (get_providers:311) - Provider opensubtitles throttle count 3 of 5, waiting 5sec and trying again
2024-01-28 20:27:17,064 - root                             (7f5139ffb700) :  INFO (get_providers:311) - Provider opensubtitles throttle count 1 of 5, waiting 5sec and trying again
opensubtitlesdev commented 7 months ago

hi,

could you:

opensubtitles

rojosinalma commented 7 months ago

Done

opensubtitles commented 7 months ago

426 is code, when we detect old Bazarr version - and upgrade is required. Will check your email.

rojosinalma commented 7 months ago

I noticed I was using an older version indeed, I will upgrade and check again.