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.
User avatar
eduo
Posts: 716
Joined: Sat Feb 10, 2007 1:40 am
Location: Information Technology
Contact: ICQ Website Yahoo Messenger

Optional parameter in searchSubtitles to save time

Sat Apr 14, 2012 5:55 pm

Hi.

I have two things:
Thing 1.-I've just realised that the searchsubtitles routine could be optimized to save on queries to the server.

The current process in my tool is:

1.-Select several files
2.-Search in OS by hash
3.-For all movies not matched by hash do a search of IMDB by moviehash
4.-For all movies matching an IMDB do an IMDB search
5.-For all movies not matched by hash to an IMDB do a name search.

There could be an optional parameter to searchsubtitles() which, if included, could return the IMDBID of the moviehash even if there're no subtitles present. This would save step 3 above and make the process faster.

1.-Select several files
2.-Search in OS by hash
3.-Search for all movies matched to an IMDB
4.-For all remaining movies do a name search

Thing 2.-Can multiple searches by hash be done on the same xml request? It would save a lot of unnecessary queries and results.

As you know, SolEol (and others) allow multiple language searches. The problem is when you're trying to complement missing subs. See the next example:

a.avi
b.avi
b.en.avi
c.avi
c.es.avi
d.avi
d.en.avi
d.es.avi

Here I would search subs for a, b and c. I wouldn't search for d as it has both languages defined.

The problem is that currently I would need to do a searchsubtitles for "eng,spa" for a, b and c:

a.avi, b.avi, c.avi -> eng,spa

What I'd really need to do is:

a.avi -> eng,spa
b.avi -> spa
c.avi -> eng

This would return a lot less results and should be easier on the network and the server as well.

I have thought of doing multiple queries but it would be nice to do it in an array of searches (currently multiple searches can be done in an array, but of different types, I haven't tried to do the above).

Is this currently possible?
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 66 guests