Forum rules
Under no circumstances is spamming or advertising of any kind allowed. Do not post any abusive, obscene, vulgar, slanderous, hateful, threatening, sexually-orientated or any other material that may violate others security. Profanity or any kind of insolent behavior to other members (regardless of rank) will not be tolerated. Remember, what you don’t find offensive can be offensive to other members. Please treat each other with the kind of reverence you’d expect from other members.
Failure to comply with any of the above will result in users being banned without notice. If any further details are needed, contact: “The team” using the link at the bottom of the forum page. Thank you.
User avatar
rednoah
Posts: 84
Joined: Tue Mar 11, 2008 10:02 pm

Disable search limit

Sun Jan 26, 2014 5:10 pm

Hi oss,

Is there a way to disable to search limit (or allow me to set it really high) and give me all available subtitles? Or some sort of paging mechanism?

The reason is that FileBot will try to search by name if hash lookup doesn't work. For example if I want to download subtitles for Dexter S08E03 it's impossible since that result would already beyond the 500 limit so to API clients it looks as if no subs for Dexter S08E03 are available.

Any suggestions how to get around this?

--red

User avatar
oss
Site Admin
Posts: 5879
Joined: Sat Feb 25, 2006 11:26 pm
Contact: Website

Re: Disable search limit

Sun Jan 26, 2014 7:01 pm

send me API example (parameters) I will check it.

User avatar
rednoah
Posts: 84
Joined: Tue Mar 11, 2008 10:02 pm

Re: Disable search limit

Sun Jan 26, 2014 9:21 pm

Here's the request. Just a listing subtitles for Dexter:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?><methodCall><methodName>SearchSubtitles</methodName><params><param><value><string>XXX</string></value></param><param><value><array><data><value><struct><member><name>sublanguageid</name><value><string>eng</string></value></member><member><name>imdbid</name><value><string>773262</string></value></member></struct></value></data></array></value></param></params></methodCall>
The response is to big to post. But it's limited to 500 entries.

e.g. this subtitles is not in the list:
http://www.opensubtitles.org/en/search/ ... id-2578760

So if I wanted to download subtitles for Dexter S08E03 it seems to only be possible via the website.
2014-01-27 03_20_47-FileBot.png
2014-01-27 03_20_47-FileBot.png (50.83 KiB) Viewed 13187 times

User avatar
oss
Site Admin
Posts: 5879
Joined: Sat Feb 25, 2006 11:26 pm
Contact: Website

Re: Disable search limit

Mon Jan 27, 2014 8:24 am

you can specify ROOT TV SERIES IMDB and then SEASON and EPISODE. Check here:

http://trac.opensubtitles.org/projects/ ... hSubtitles

my arguments for SearchSubtitles looks like:

Code: Select all

array('imdbid' => '773262', 'sublanguageid' => 'eng', 'season' => 8, 'episode' => 3),
and I get 7 results, same, as on webpage.

=> everything works great :)

User avatar
rednoah
Posts: 84
Joined: Tue Mar 11, 2008 10:02 pm

Re: Disable search limit

Mon Jan 27, 2014 9:03 am

In my case, for batch downloading subtitles, it would be faster to just grab all subs for a series and then do all the matching client-side, instead of sending off lots of queries for lots of episodes.

Is there a way to just set the limit on the request? The docs say you can specify a limit up to 500, which is a good default i guess, but it would be nice if the client could set limits higher than this if required (if even that is than capped at 2000 it would still be a big help).

User avatar
oss
Site Admin
Posts: 5879
Joined: Sat Feb 25, 2006 11:26 pm
Contact: Website

Re: Disable search limit

Tue Jan 28, 2014 7:14 am

I set it up to 2000. I will not change documentation for now. Let me know, if it helps.

User avatar
rednoah
Posts: 84
Joined: Tue Mar 11, 2008 10:02 pm

Re: Disable search limit

Tue Jan 28, 2014 11:12 am

Awesome! Thank you very much! Adding limit=2000 to the request effectively solves the issue above!

User avatar
oss
Site Admin
Posts: 5879
Joined: Sat Feb 25, 2006 11:26 pm
Contact: Website

Re: Disable search limit

Tue Jan 28, 2014 1:10 pm

you are welcome and thank you too :)

User avatar
rednoah42
Posts: 55
Joined: Sat Sep 17, 2011 5:19 am

Re: Disable search limit

Mon Feb 22, 2016 11:20 am

The limit is fixed at 500 again now, and I'm seeing some issues with not being able to find subtitles for (long-running) shows because the subtitles I'm looking for aren't in the top 500 results.

Setting a higher limit (either by default, or via xml-rpc parameter) would definitely fix these issues for me.

User avatar
oss
Site Admin
Posts: 5879
Joined: Sat Feb 25, 2006 11:26 pm
Contact: Website

Re: Disable search limit

Mon Feb 22, 2016 11:32 am

ouch, I would think 500 limit is enough for everybody. Can you give example when you would need more than 500 results ?

User avatar
rednoah42
Posts: 55
Joined: Sat Sep 17, 2011 5:19 am

Re: Disable search limit

Mon Feb 22, 2016 3:56 pm

Request for "The Vampire Diaries":
http://pastebin.com/3s4JzWQK

Response limited to 500 results:
http://pastebin.com/p9MMjiYB


Lots of subtitles for The Vampire Diaries Season 6 or Season 7 can't be found in the first 500 results (e.g. S07E12) because of the limit. Naturally, this is an issue that happens almost exclusively with popular long-running shows where the number of (typically English) subtitles surpasses the limit. A (slightly) higher limit would virtually eliminate this kind of issue.


Now I could go on and make requests for each individual episodes, but that'd be excessive to the server, and slow for the client. I'd rather just cache a list of all subtitles for the given show and match them to files myself (if hash lookup isn't working).
Last edited by rednoah42 on Mon Feb 22, 2016 4:04 pm, edited 1 time in total.

User avatar
oss
Site Admin
Posts: 5879
Joined: Sat Feb 25, 2006 11:26 pm
Contact: Website

Re: Disable search limit

Mon Feb 22, 2016 4:04 pm

what about to limit for season you need ?

and also much better to use imdbid, not fulltext search

User avatar
rednoah42
Posts: 55
Joined: Sat Sep 17, 2011 5:19 am

Re: Disable search limit

Mon Feb 22, 2016 4:18 pm

1.
If I limit by season, then I'd still have to do 7 requests for 7 seasons, and make OpenSubtitles collect 3500 results. Better than making a request for every episode, but still bad for client and server.

If 1 request for all subtitles could yield 1000-2000 subtitles, than that would be enough in this case, and all the other similar cases like Stargate SG-1. To me, that seems to be a much more efficient option. Most shows probably don't even have that many subtitles anyway.

One reason why 500 don't fit all relevant subs is probably because many subtitles are near-duplicates, but I don't think you can filter those out easily and efficiently.


2.
Search is done by imdbid, and the idea is to get all subtitles for this specific show:

Code: Select all

<name>imdbid</name> <value> <string>1405406</string> </value>
I don't use full-text search, but I can see why having a lower limit with full-text search makes sense. But for by-id lookup a higher limit would be nice.

User avatar
oss
Site Admin
Posts: 5879
Joined: Sat Feb 25, 2006 11:26 pm
Contact: Website

Re: Disable search limit

Mon Feb 22, 2016 4:53 pm

Sorry, we have different views on this, I will not change this, at least for now.

If you have to specify seasons, make 7 requests for 7 seasons, it is there for reason. Sometimes it is better for server (mysql/http connection blocking...)

Back in time I didnt want to allow even fulltext searching there. SearchSubtitles() meant to be for searching by hash, but thats another story.

User avatar
rednoah42
Posts: 55
Joined: Sat Sep 17, 2011 5:19 am

Re: Disable search limit

Tue Feb 23, 2016 12:19 pm

Alright, I'll have to account for the 500 result limit on the client side then.

Return to “Programs using OS”

Who is online

Users browsing this forum: Google [Bot] and 31 guests