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.
Codeclown
Posts: 3
Joined: Mon Nov 01, 2010 10:04 am

How to actually search for subtitles by movie-name?

Mon Nov 01, 2010 10:09 am

Hey

I'm sorry for this kind of stupid question, but I've successfully added LogIn() to my webapp (so my code is working) and now I need to move into searching. I think it's too complicated to search via hashes, if user only knows the name of the movie. I'd like to have similar kind of search as on the site itself. First find all the matching movies, then print all subs filenames found for them (some limit should occur). I'm trying to use the SearchSubtitles, but it only returns this:
array(3) {
["status"]=>
string(6) "200 OK"
["data"]=>
bool(false)
["seconds"]=>
float(0.013)
}
Here's my (simple) piece of php:

Code: Select all

$client->SearchSubtitles($token,array('query'=>'The Dark Knight'));
I'm wishing for some help, as my app supports other sub-providers already and Opensubtitles would be seriously cool to add.

Thanks,
Martti Laine

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

Re: How to actually search for subtitles by movie-name?

Mon Nov 01, 2010 11:24 am

here it works OK. try again.

for fulltext search you can use URL, just go to main page and within each page, you can add /xml at the end, like:

http://www.opensubtitles.org/en/search2 ... matrix/xml
http://www.opensubtitles.org/en/search/ ... /simplexml

Codeclown
Posts: 3
Joined: Mon Nov 01, 2010 10:04 am

Re: How to actually search for subtitles by movie-name?

Mon Nov 01, 2010 4:19 pm

here it works OK. try again.

for fulltext search you can use URL, just go to main page and within each page, you can add /xml at the end, like:

http://www.opensubtitles.org/en/search2 ... matrix/xml
http://www.opensubtitles.org/en/search/ ... /simplexml
Thanks! I knew about /xml but it had too much useless information that I wanted to try the XML-RPC. I'll use the /simplexml now :)

Codeclown
Posts: 3
Joined: Mon Nov 01, 2010 10:04 am

Re: How to actually search for subtitles by movie-name?

Mon Nov 01, 2010 4:36 pm

here it works OK. try again.

for fulltext search you can use URL, just go to main page and within each page, you can add /xml at the end, like:

http://www.opensubtitles.org/en/search2 ... matrix/xml
http://www.opensubtitles.org/en/search/ ... /simplexml
By the way, the simplexml gives me this:
Not MySQL resource while getting results

erndev
Posts: 6
Joined: Mon Nov 01, 2010 8:40 pm

Re: How to actually search for subtitles by movie-name?

Mon Nov 01, 2010 8:55 pm

Hey

I'm sorry for this kind of stupid question, but I've successfully added LogIn() to my webapp (so my code is working) and now I need to move into searching. I think it's too complicated to search via hashes, if user only knows the name of the movie. I'd like to have similar kind of search as on the site itself. First find all the matching movies, then print all subs filenames found for them (some limit should occur). I'm trying to use the SearchSubtitles, but it only returns this:
array(3) {
["status"]=>
string(6) "200 OK"
["data"]=>
bool(false)
["seconds"]=>
float(0.013)
}
Here's my (simple) piece of php:

Code: Select all

$client->SearchSubtitles($token,array('query'=>'The Dark Knight'));
I'm wishing for some help, as my app supports other sub-providers already and Opensubtitles would be seriously cool to add.

Thanks,
Martti Laine


Hi

first of all, Hi to everyone. I am new here.

Just to let you know, i am also trying to test the xmlrpc API, and the opposite is happening to me.
I can search subtitles using the query paramater and the file name, but if i want to use the hash, i always get the same response as you:

{
data = 0;
seconds = 0.035;
status = "200 OK";
}

I will keep trying...
best regards

erndev
Posts: 6
Joined: Mon Nov 01, 2010 8:40 pm

Re: How to actually search for subtitles by movie-name?

Mon Nov 01, 2010 10:21 pm

Hey

I'm sorry for this kind of stupid question, but I've successfully added LogIn() to my webapp (so my code is working) and now I need to move into searching. I think it's too complicated to search via hashes, if user only knows the name of the movie. I'd like to have similar kind of search as on the site itself. First find all the matching movies, then print all subs filenames found for them (some limit should occur). I'm trying to use the SearchSubtitles, but it only returns this:
array(3) {
["status"]=>
string(6) "200 OK"
["data"]=>
bool(false)
["seconds"]=>
float(0.013)
}
Here's my (simple) piece of php:

Code: Select all

$client->SearchSubtitles($token,array('query'=>'The Dark Knight'));
I'm wishing for some help, as my app supports other sub-providers already and Opensubtitles would be seriously cool to add.

Thanks,
Martti Laine


Hi

first of all, Hi to everyone. I am new here.

Just to let you know, i am also trying to test the xmlrpc API, and the opposite is happening to me.
I can search subtitles using the query paramater and the file name, but if i want to use the hash, i always get the same response as you:

{
data = 0;
seconds = 0.035;
status = "200 OK";
}

I will keep trying...
best regards
ups, silly me.
i copied and pasted the hash for test, and one character was missing... :shock:

everything is working fine with the hash for me...

sorry :-)

erndev
Posts: 6
Joined: Mon Nov 01, 2010 8:40 pm

Re: How to actually search for subtitles by movie-name?

Tue Dec 07, 2010 1:28 pm

Hi

i've been playing around with movie-name search.
I've found that if I include two queries in the SearchSubtitles RPC call, only results for the last one are returned.
ie.

Code: Select all

SearchSubtitles "xxxxxx", [ {query:"The Dark Knight", sublanguageid:"eng,ita"},{query:"Salt", sublanguageid:"eng,ita"}] 
will only return subtitles for "Salt"


If i call

Code: Select all

SearchSubtitles "xxxxxx", [{query:"Salt", sublanguageid:"eng,ita"}, {query:"The Dark Knight", sublanguageid:"eng,ita"}]
the i only get results for "The Dark Knight"

is it the way it works? "Query" can be only used once inside a SearchSubtitle call and we should call it once for every movie?
or am i doing something wrong?

best regards

EDIT: I found this 2008 post . It seems it's the way it works (only the last one)
viewtopic.php?f=8&t=1594&p=5419
Last edited by erndev on Tue Dec 07, 2010 1:47 pm, edited 1 time in total.

erndev
Posts: 6
Joined: Mon Nov 01, 2010 8:40 pm

Re: How to actually search for subtitles by movie-name?

Tue Dec 07, 2010 1:38 pm

ok I forgot...
another question about the text-search

Is there any way to search using OR / AND in the text query?
i think i have tried all the posible combinations of OR AND | & && || + - and none seems to do it..

For instance, let's say i wan to search for Batman Returns and Batman Forever.
Is there any way to query something like this (Batman AND (Returns OR Forever)

not a very useful example , i know , but you can get the idea of what i mean :D


regards

User avatar
eduo
Posts: 716
Joined: Sat Feb 10, 2007 1:40 am
Location: Information Technology
Contact: ICQ Website Yahoo Messenger

Re: How to actually search for subtitles by movie-name?

Sun Jan 16, 2011 1:20 am

I would particularly like to be able to search with double quotes for exact matches, too.

Try searching for the movie "Red" otherwise :D
http://eduo.info/
[url=http://eduo.info/soleol/]OpenSubtitles from your desktop: SolEol for Mac/Windows/Linux[/url]
[url=http://forums.plexapp.com/index.php?showtopic=325&st=0&p=2480&#entry2480]My current episode processing work flow[/url].

Return to “Developing”

Who is online

Users browsing this forum: No registered users and 21 guests