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.
Christofer
Posts: 7
Joined: Tue Apr 01, 2008 5:25 pm

Something's wrong with SearchSubtitles

Thu Apr 03, 2008 1:29 am

Code: Select all

private void button1_Click(object sender, EventArgs e) { openFileDialog1.ShowDialog(); string fileName = openFileDialog1.FileName; IOSDb os = XmlRpcProxyGen.Create<IOSDb>(); os.Url = "http://www.opensubtitles.org/xml-rpc"; string token = os.LogIn("", "", "en", "")["token"].ToString(); string[] sa = { "en", ComputeMovieHash(fileName), new FileInfo(fileName).Length.ToString() }; string[][] se = {sa}; string thisIsAlwaysFalse = os.SearchSubtitles(token, se)["data"].ToString(); thisIsAlwaysFalse = thisIsAlwaysFalse + ""; }
I'm writing a client in c# but I can't seem to get a result from SearchSubtitles. It sets the value of data to false every time. Login works though. I've also tested with oscar and that finds english subtitles for the same file. I'm not sure I understood the API documentation for SearchSubtitles so the problem might lay there.

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

Thu Apr 10, 2008 9:46 am

Hi,

sorry for late, reply. I dont code in C#, but you can read it from my PHP code:

Code: Select all

function SearchSubtitles($host, $uri, $options) { return xu_rpc_http_concise( array( 'method' => "SearchSubtitles", 'args' => array( "123", array( array('movietimems'=> '', 'moviebytesize'=> '733589504', 'subfilename'=> 'Night.Watch.2004.DVDRip.XviD-FiCO.cd1.srt', 'subhash'=> '0ac07f76f6e6fca8c0b025e821469bbc', 'movieframes'=> '', 'moviefps'=> '', 'moviefilename'=> 'Night.Watch.2004.DVDRip.XviD.FiCO.CD1.(osloskop.net).avi', 'moviehash'=> '09a2c497663259cb'), array('movietimems'=> '', 'moviebytesize'=> 733919232, 'subfilename'=> 'Night.Watch.2004.DVDRip.XviD-FiCO.cd2.srt', 'subhash'=> '69ea78b612f999b695d7d797c06c87f6', 'movieframes'=> '', 'moviefps'=> '', 'moviefilename'=> 'Night.Watch.2004.DVDRip.XviD.FiCO.CD2.(osloskop.net).avi', 'moviehash'=> '1dab7c63893d0d81'), ) ), 'host' => $host, 'uri' => $uri, 'port' => 80, 'options' => $options ) ); }
and here it is output:
http://www.opensubtitles.com/addons/xml-rpc-demo.php

Return to “Programs using OS”

Who is online

Users browsing this forum: No registered users and 24 guests