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.
free4ride
Posts: 7
Joined: Tue Sep 01, 2015 7:21 am

Search by title - no results (C#)

Tue Sep 01, 2015 7:52 am

Hi,
Sometimes when I perform a search query I don't get any results (whereas they are returned on the website).

For example (I use CookComputing.XmlRpc lib to make requests):

Code: Select all

string title = "Troy"; var searchParams = new XmlRpcStruct(); searchParams.Add("query", title); var limit = new XmlRpcStruct(); limit.Add("limit", 10); var response = _proxy.SearchSubtitles(_token, new { searchParams },limit);
There are results on the web:
http://www.opensubtitles.org/en/search2 ... ename-troy

Is it normal?

Another thing: the limit parameter doesn't work for me - it returns max number of results if there are.
What am I doing wrong?

Thank you ahead for your help

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

Re: Search by title - no results (C#)

Tue Sep 01, 2015 3:58 pm

:) just recently I limit that search must be minimum 5 characters long. I will change it to 4. Many searches (short) are nonsense.

For limit parameter - you are right, it is ignored for now. Fix will be applied.

free4ride
Posts: 7
Joined: Tue Sep 01, 2015 7:21 am

Re: Search by title - no results (C#)

Tue Sep 01, 2015 4:51 pm

Thank you for the clarification.
Maybe we could have an exact match for 2-3 characters search phrases if you are afraid of performances. If not, we will loose access to movies like:
TED,300, PI, Elf,9,Up,m,Ray,Saw,Red,Ran,...
I found a workaround to perform a web request (google + imdb + movie title), parse returned html, extract imdb ids and perform requests to your api by imdbId exact match. But it sounds like an overhead and forces to perform many requests -> Is number of this kind of requests limited? (I know that the number for requests to download subtitles is limited to 100 per day).

maybe I will explain what I would like to achieve.
I would like to have sth similar like the opensubtitles search on the home opensubtitles.org page (without autocomplete not to stress your api, just to perform request on enter click to get a list with movie subtitles) and here is my another question.
What is better for you (i don't want to stress your server):
a) One request (query by title) which returns many rows (500)
b) Many requests by imdb id with limit 10.

if sth is not clear please let me know and I will try to give more details
many thanks for your help

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

Re: Search by title - no results (C#)

Tue Sep 01, 2015 5:02 pm

Hi,

ok I removed limitation completely for length of input search. Also limit is working now OK. For your question, it is better, when you perform queries without limit (technically, we are caching limit 500 results, and then, when you want just 10, we slice the array...)

free4ride
Posts: 7
Joined: Tue Sep 01, 2015 7:21 am

Re: Search by title - no results (C#)

Tue Sep 01, 2015 8:44 pm

Awesome, works great.
Many thanks!

Return to “Developing”

Who is online

Users browsing this forum: No registered users and 25 guests