Release - [service.subtitles.opensubtitles]

  Thread Rating:
  • 2 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
Jaman42 Offline
Member
Posts: 58
Joined: Jan 2014
Reputation: 0
Post: #31
This is probably somewhere on the forums already but perhaps my Google fu is to weak. On some movies I get 500 subtitles returned from the search. I don't get why because on most of them they don't share a single word with the movie being searched for. How does it match the search?

XBMC 13.1, searching for swedish and english subtitles, confluence skin if that affects anything

I got the movies in the following structure;
Foldername: Moviename (Year)
Filename like: moviename.year.resolution.source.codec-group.extension

I thought the foldername was being used when searching for a movie and then the file name was used to match if the subtitle is in sync. But maybe that's not at all how it works?

Just did a search, "500 subtitles found", some of them contains the word being searched for but far, far from all of them. Same result if I enter a manual search string with the movie name. The movie name consists of one word and one word only, no spaces, nothing else. Returning 500 results with nothing in common with the search string.

Any ideas, or is this a known "feature" ? Smile
find quote
amet Offline
Retired Team-Kodi Member
Posts: 4,110
Joined: Jul 2009
Reputation: 41
Location: Novi Sad / Dubai
Post: #32
Debug Log might know?
find quote
Jaman42 Offline
Member
Posts: 58
Joined: Jan 2014
Reputation: 0
Post: #33
Nothing strange in there, it seems like it's the response from opensubtitles that returns some really strange data when using certain search strings. For example if you search for "belle" in a manual search you get the maximum return of 500 hits, some makes sense for example: The beautiful prisoner, the original title being La belle captive. I can't seem to find the logic of some others but I'm guessing they have some AKA that matches or something like that. The main problem is that the one that actually match is nowhere near the top.

I pinned it down to the manual search being the problem, or rather the query string that is added to the search no matter if you do a manual or automatic search, really hard to find the sub I want among 500 so I made some changes to make it work more like I want to. I am a beginner at Python so the code I have added might not be the most optimal but it works for me, maybe someone else can make some use of it or get ideas for your own customization. I have not done any tests on windows, not sure if I have used any OS specific code. Also I have not done any extensive testing, but at least it's a start.

I always have a .nfo in the folder with the movie containing a imdb id, so I have added some code to look for that nfo and fetch the id in it so I can append a search using the imdb id. So my version first search using the moviehash with a imdbid search appended if the nfo exists and contains the id. I also only append the OS_search_string if the first search returns empty, if it's a manual search or if it's a tv show. I also changed how the manual search works, if you enter a manual string this string is the only thing used in the search.

I have also changed the sort order a bit to get the most relevant on top:
moviehash match > same filename for the sub. and movie > Movie title in sub. filename > Swedish (I search for english and swedish subs)

I also added to flag as sync if subtitles filename is the same as the movie filename, this is not convenient if you rename your movies but i always keep the original name.

That's about where I am atm, now I get 2 results when searching with IMDB id instead of 500, double checking on opensubtitles.org lets me know that there are only two available english subtitles for this movie. And if I make a manual search using the name of the movie I still get the most relevant on top.

*Edit: Making PR on Github as suggested instead, might be more helpful even if they don't get merged
(This post was last modified: 2014-08-14 09:50 by Jaman42.)
find quote
amet Offline
Retired Team-Kodi Member
Posts: 4,110
Joined: Jul 2009
Reputation: 41
Location: Novi Sad / Dubai
Post: #34
Cool, please make a github PR for it so it can be reviewed properly and included in next version.

Thanks for your help
find quote
Jaman42 Offline
Member
Posts: 58
Joined: Jan 2014
Reputation: 0
Post: #35
Most of the changes are probably not anything you would like in a default release, perhaps the ability to search a nfo for imdb id and maybe to use only the manual string in the search when one is entered. But the other tweaks are only useful if you don't rename your movies, and if you prefer Swedish subtitles over English Smile, so not default material. Just thought someone might find it useful.

*Edit: Perhaps I do some PR on the other stuff, maybe together it can be improved
(This post was last modified: 2014-08-14 09:50 by Jaman42.)
find quote
amet Offline
Retired Team-Kodi Member
Posts: 4,110
Joined: Jul 2009
Reputation: 41
Location: Novi Sad / Dubai
Post: #36
good work, see my comments on githib

thx!
find quote
romano Offline
Member
Posts: 61
Joined: Feb 2014
Reputation: 0
Post: #37
Hello, is it normal that opensubtitles now only shows just the sync legends? or iam missing some configurations?
Edit: i think its good now.
(This post was last modified: 2014-09-08 11:57 by romano.)
find quote
Rourke Offline
Junior Member
Posts: 24
Joined: Aug 2013
Reputation: 0
Post: #38
I'm using advancedsettings path substitution, but this opensubtitles service I'm using doesn't work with it.

Here is the log file: http://www.xbmclogs.com/show.php?id=295540
At the start you can see my advancedsettings.xml contents. It tries to open or write in a local directory instead of the defined nfs://192.168.1.200/volume1/xbmc/userdata/addon_data/.

How can I get this back to work?
find quote
Martijn Offline
Team Kodi
Posts: 11,344
Joined: Jul 2011
Reputation: 164
Location: Dawn of time
Post: #39
(Yesterday 17:40)Rourke Wrote:  I'm using advancedsettings path substitution, but this opensubtitles service I'm using doesn't work with it.

Here is the log file: http://www.xbmclogs.com/show.php?id=295540
At the start you can see my advancedsettings.xml contents. It tries to open or write in a local directory instead of the defined nfs://192.168.1.200/volume1/xbmc/userdata/addon_data/.

How can I get this back to work?

Don't use path substitution.

Always read the XBMC online-manual, FAQ and search the forums before posting.
Do NOT e-mail Team-XBMC members asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting, make sure you read this first

For your mediacenter artwork go to
[Image: fanarttv.png]
find quote
FAMMAR Offline
Senior Member
Posts: 111
Joined: Dec 2013
Reputation: 2
Post: #40
I got 2 languages selected in settings but when I am getting the list I see them through eachoter, so no Dutch first and then Englisch
find quote
Rourke Offline
Junior Member
Posts: 24
Joined: Aug 2013
Reputation: 0
Post: #41
(Yesterday 17:55)Martijn Wrote:  
(Yesterday 17:40)Rourke Wrote:  I'm using advancedsettings path substitution, but this opensubtitles service I'm using doesn't work with it.

Here is the log file: http://www.xbmclogs.com/show.php?id=295540
At the start you can see my advancedsettings.xml contents. It tries to open or write in a local directory instead of the defined nfs://192.168.1.200/volume1/xbmc/userdata/addon_data/.

How can I get this back to work?

Don't use path substitution.

Thanks for your reply. I ran into some other problems with it, and I won't use it anymore.

For me it's an answer to a problem. It's very unfortunate it cannot work. Could you perhaps elaborate why it shouldn't be used? It is even suggested on the wiki I got it from.
find quote
Post Reply