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.
pahunt78
Posts: 1
Joined: Mon Nov 19, 2012 11:42 am

SearchSubtitles not returning expected results

Mon Nov 19, 2012 12:01 pm

Hi,

I am just starting to develop an application using the API and I'm having a problem where I am not getting the expected results when searching for subtitles. For my test I am searching for English subtitles for episode 7 of season 7 of the series "Dexter" and the filename I have is "Dexter.S07E07.720p.HDTV.x264-IMMERSE.mkv". Firstly, I manually searched for the subs on the site to ensure they exist and they do:

Image

I have then written code that calculates the byte size of the video which comes out at 1148409571 bytes, matching what is listed on the site. I then calculate the movie hash value using the example code in the API documentation and it returns a value of "a47af398806c0979". To double-check the code is correct I then run this value through the CheckMovieHash function in the API and it returns the correct episode of Dexter, so I know that must be correct. However I then call the SearchSubtitles function specifying moviehash, moviebytesize and sublanguageid and I get no results returned however if I don't specify the language I get 4 results, 2 in French and 2 in Spanish.

So my question is this, what am I doing wrong that means I don't see the English version of the subtitles that I can see through the main site when using the API?

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

Re: SearchSubtitles not returning expected results

Fri Dec 07, 2012 9:17 am

Yes, there seems to big a huge issue with searching for tv shows.

For example if you run a query for 'the simpsons' I get barely any subtitles even though there's one for each and every episode if i check the website.

moryoav
Posts: 2
Joined: Mon Dec 10, 2012 1:30 pm

Re: SearchSubtitles not returning expected results

Mon Dec 10, 2012 1:31 pm

Any progress with this issue? I have the same problem with The Simpsons and 30 Rock.

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

Re: SearchSubtitles not returning expected results

Mon Dec 10, 2012 6:18 pm

hi, thanks you found out this. It was caused by internal optimalization, and in some rare cases it was not held properly. Now it should work good, please allow 24 hours to expire cache, but if you specify language as "eng,cze" for example it should work already so you can check...

rednoah - please specify the question. If you send the query 'the simpsons' using API, you get no results ?

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

Re: SearchSubtitles not returning expected results

Tue Dec 11, 2012 11:12 am

Ok, so I'm running query by IMDb tt0096697 (The Simpsons 1989) and I get 29 results (mostly subs for S4 and S24).

There's like 1000+ subtitles here:
http://www.opensubtitles.org/en/ssearch ... movie-2006

How come I don't get all those subs via XMLRPC.SearchSubtitles?

Here's the http traffic:
http://pastebin.com/VdymwRrN

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

Re: SearchSubtitles not returning expected results

Tue Dec 11, 2012 12:34 pm

Hi,

this is caused because you are looking on opensubtitles for ssearch page, and that imdb is root series for simpsons. Check this:
http://www.opensubtitles.org/en/search/ ... /redir-off

and you should get similar results (same) in API, which I believe you get.

The question is, if you need to get for root series imdb all episodes (other imdb) also.

I would like to know opinion of other developers if this is vital.

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

Re: SearchSubtitles not returning expected results

Tue Dec 11, 2012 1:58 pm

Ah, there's a imdb for the series and then there is an imdb for each episode. So with SearchMoviesOnIMDB I only get back these series root imdbs which makes sense in which case it would make the most sense if i get all the subtitles for that series of i retrieve subtitles by root imdbid.

In my application i first check what series/movie the user is looking for via SearchMoviesOnIMDB and then I want to retrieve all the subs for that show or movie. Is there anyway to do this currently?

Since each episode has it's own imdbid, doesn't that mean that the root imdbids themselves can't have subtitles? That doesn't make much sense. My argument for extending the API this way. :P

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

Re: SearchSubtitles not returning expected results

Wed Dec 12, 2012 6:41 am

in root imdb series are subtitles, which are unsorted (doesnt belong to any episode for some reason). I understand your scenario and I will make it available, when searching on series root imdb it will return all subtitles (limited to max results).

EDIT: I just updated source files. So now, when in API you search using imdbid, there are scenarios:
1. if is specified episode or season, it is searching in root imdb series, web example: http://www.opensubtitles.org/en/search/ ... 7/season-1
2. if imdbid is root tv series, it is searching in all root imdb series, returning all episodes and seasons, web example: http://www.opensubtitles.org/en/search/ ... dbid-96697
3. in any other cases it is searching original imdbid

I hope this is desired behaviour

moryoav
Posts: 2
Joined: Mon Dec 10, 2012 1:30 pm

Re: SearchSubtitles not returning expected results

Wed Dec 12, 2012 9:52 am

hi, thanks you found out this. It was caused by internal optimalization, and in some rare cases it was not held properly. Now it should work good, please allow 24 hours to expire cache, but if you specify language as "eng,cze" for example it should work already so you can check...

rednoah - please specify the question. If you send the query 'the simpsons' using API, you get no results ?
Works! Thank you very much!

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

Re: SearchSubtitles not returning expected results

Wed Dec 12, 2012 11:14 am

Yep, works perfectly now. Thanks alot! One thing though, seems to take a long long time, hope it's not straining the servers too much.

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

Re: SearchSubtitles not returning expected results

Wed Dec 12, 2012 1:22 pm

I will check if caching is working properly, but it should (once in 24 hours I refresh it)
EDIT: it should work ok, I am getting times like '[seconds] => 0.098', so it seems fast. Also be sure to specify some sublanguageid, because the results are trimmed to 500 records, and it takes also a lot of bandwidth.

Return to “Developing”

Who is online

Users browsing this forum: No registered users and 27 guests