Page 1 of 1

Something's wrong with SearchSubtitles

Posted: Thu Apr 03, 2008 1:29 am
by Christofer

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.

Posted: Thu Apr 10, 2008 9:46 am
by oss
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