Jump to content

OpenSubtitles API request limit


Recommended Posts

Posted

Hey there,

 

does Emby server take into account the OpenSubtitles API requests limit (not subtitles download limit) when downloading subtitles as a task?

 

I'm a VIP member at OpenSubtitles and when I run the subtitles download task, after a few 10s of seconds, I start getting TooManyRequests HTTPExceptions.

2019-02-06 23:38:22.195 Info HttpClient: POST https://api.opensubtitles.org/xml-rpc
2019-02-06 23:38:22.209 Error SubtitleManager: Error downloading subtitles from Open Subtitles
	*** Error Report ***
	Version: 3.5.3.0
	Command line: /opt/emby-server/system/EmbyServer.dll -programdata /media-ssd/emby/ -ffmpeg /opt/emby-server/bin/ffmpeg -ffprobe /opt/emby-server/bin/ffprobe -restartexitcode 3 -updatepackage emby-server-rpm_{version}_x86_64.rpm
	Operating system: Unix 3.10.0.957
	64-Bit OS: True
	64-Bit Process: True
	User Interactive: True
	Processor count: 8
	Program data path: /media/emby/
	Application directory: /opt/emby-server/system
	MediaBrowser.Model.Net.HttpException: TooManyRequests
	   at Emby.Server.Implementations.HttpClientManager.CoreHttpClientManager.SendAsyncInternal(HttpRequestOptions options, String httpMethod)
	   at Emby.Server.Implementations.HttpClientManager.CoreHttpClientManager.SendAsync(HttpRequestOptions options, String httpMethod)
	   at OpenSubtitles.OpenSubtitleDownloader.SearchSubtitlesAsync(OpenSubtitleQuery[] parameters, CancellationToken cancellationToken)
	   at OpenSubtitles.OpenSubtitleDownloader.Search(SubtitleSearchRequest request, CancellationToken cancellationToken)
	   at MediaBrowser.Providers.Subtitles.SubtitleManager.SearchSubtitles(SubtitleSearchRequest request, CancellationToken cancellationToken)
	MediaBrowser.Model.Net.HttpException
	   at Emby.Server.Implementations.HttpClientManager.CoreHttpClientManager.SendAsyncInternal(HttpRequestOptions options, String httpMethod)
	   at Emby.Server.Implementations.HttpClientManager.CoreHttpClientManager.SendAsync(HttpRequestOptions options, String httpMethod)
	   at OpenSubtitles.OpenSubtitleDownloader.SearchSubtitlesAsync(OpenSubtitleQuery[] parameters, CancellationToken cancellationToken)
	   at OpenSubtitles.OpenSubtitleDownloader.Search(SubtitleSearchRequest request, CancellationToken cancellationToken)
	   at MediaBrowser.Providers.Subtitles.SubtitleManager.SearchSubtitles(SubtitleSearchRequest request, CancellationToken cancellationToken)

According to OpenSubtitles API documentation, there is a limit of 40 HTTP requests per 10 seconds per IP address, even for VIP users.

 

More info can be found on https://forum.opensubtitles.org/viewtopic.php?f=8&t=16072

 

There is also a special XML RPC endpoint for VIP users with a more stable and faster server. More info in http://trac.opensubtitles.org/projects/opensubtitles/wiki/XMLRPC#LogIn

 

I'm using Emby Server 3.5 on a CentOS 7 linux.

 

Thanks, Matej

Happy2Play
Posted

Your issue will still be you have to upgrade to v4 in order to get a updated plugin.  But have no idea if this issue still exists in plugin v1.0.11.0.

Posted

We can look at incorporating the special server url for vip users.

Posted (edited)

Yea, I know I'll have to upgrade. I have upgrade planned, I'm just a little hassitated, since I'm also using Kodi and I'm not sure how stable new Emby is with latest Kodi.

 

Luke, do you know if the latest opensubtitles plugin in v4 support API request throttling? I think the special URL also has the same limits as the "standard" one.

Edited by matejz
Posted

No, but once we switch to the special url we'll re-evaluate and see where we stand. thanks.

Posted

Same issue here, vip user and timeout every now and than.

Posted

I think we are all hit by this API req limits.

 

Luke, when download subtitles task is running, does it search for subtitles for every movie/tv show, even if it already has subtitles?

Posted

 

 

Luke, when download subtitles task is running, does it search for subtitles for every movie/tv show, even if it already has subtitles?

 

No.

Posted

I've published an update to the OpenSubtitles plugin which now uses the special api for VIP members. Please try that. Thanks.

Posted

What is the plugin version? I'm still seeing 1.0.2.0 as the latest. Do I need to upgrade to Emby 4.0?

Posted

Yes you'll need to update.

Posted

Cheers Luke, will test it today.

Posted

Its working fine if u do manual search for subtitles (from movie for example). req limit pops up in log if i start scheduled task for download subs for whole library.

Posted

Yes, problems with req limit is only present when running as a task.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...