Release - [service.subtitles.opensubtitles]

  Thread Rating:
  • 2 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
Jaman42 Offline
Member
Posts: 50
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
How do ya like them apples?
Posts: 4,100
Joined: Jul 2009
Reputation: 41
Location: Novi Sad / Dubai
Post: #32
Debug Log might know?


Always read the XBMC_Online_Manual,Frequently_Asked_Questions and search the forum before posting.
For troubleshooting and bug reporting use -> Log_file.
find quote
Jaman42 Offline
Member
Posts: 50
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
How do ya like them apples?
Posts: 4,100
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


Always read the XBMC_Online_Manual,Frequently_Asked_Questions and search the forum before posting.
For troubleshooting and bug reporting use -> Log_file.
find quote
Jaman42 Offline
Member
Posts: 50
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
How do ya like them apples?
Posts: 4,100
Joined: Jul 2009
Reputation: 41
Location: Novi Sad / Dubai
Post: #36
good work, see my comments on githib

thx!


Always read the XBMC_Online_Manual,Frequently_Asked_Questions and search the forum before posting.
For troubleshooting and bug reporting use -> Log_file.
find quote
Post Reply