When I used to search a subtitle, I would get the result, if it was available. Now I get a list of about 50 subtitles that bear no resemblance to the one I sought.
Can you give an example of a request so we can investigate ?
oh that’s weird, usually kodi works well finding the proper id’s… could you send me the log file for this search ? https://kodi.wiki/view/Log_file
https://www.opensubtitles.com/en/contact/
Hi, I’ve got the exact same problem and sent my log from kodi with a screenshot of the search result.
This problem occured a few days ago.
There were also problems trying to download subs from opensubtitles.org within kodi, but they’ve been resolved since today.
Perhaps they’re connected?
Hi os_admin.
I’ve been experimenting with opensubtitles.com add-on in kodi for TVShows lately because of the same issue: 50 items found and most of the time not useable.
I’ve added some code (in dataprovider.py) to your add-on to pick up the tmdbid (using tvshowid) and provide that as the parent_tmdb_id in the query. That seems to be working great.
For example, S01E01 of the X-files searches used to provide over 50 (mostly irrelevant) hits; adding tmdb_id now returns 10 meaningful (in my case Dutch) subtitles.
If no tmdbid is present, fallback to original approach.
This might be useful for others as well, I guess.
Ton.
p.s. I noticed an attempt was made in this direction before but abandoned as Kodi returns false tmdbId; I agree with that, so used an additional call:
“TVShowDetails = xbmc.executeJSONRPC(‘{ “jsonrpc”: “2.0”, “id”:“1”, “method”: “VideoLibrary.GetTVShowDetails”, “params”:{“tvshowid”:’+item[“tvshowid”]+‘, “properties”: [“episodeguide”]} }’)” in below code
if item[“tv_show_title”]:
item[“tvshowid”] = xbmc.getInfoLabel(“VideoPlayer.TvShowDBID”)
item[“query”] = item[“tv_show_title”]
item[“year”] = None # Kodi gives episode year, OS searches by series year. Without year safer.
# TODO if no season and episode numbers use guessit
if len(item[“tvshowid”]) != 0:
TVShowDetails = xbmc.executeJSONRPC(‘{ “jsonrpc”: “2.0”, “id”:“1”, “method”: “VideoLibrary.GetTVShowDetails”, “params”:{“tvshowid”:’+item[“tvshowid”]+‘, “properties”: [“episodeguide”]} }’)
TVShowDetails_dict = json.loads(TVShowDetails)
episodeguideXML = TVShowDetails_dict[“result”][“tvshowdetails”][“episodeguide”]
episodeguide = ET.fromstring(episodeguideXML)
episodeguideJSON = json.loads(episodeguide.text)
item[“parent_tmdb_id”] = int(episodeguideJSON[“tmdb”])
elif item[“original_title”]:
item[“query”] = item[“original_title”]
if item["parent_tmdb_id"] == 0:
if not item["query"]:
log(__name__, "query still blank, fallback to title")
item["query"] = normalize_string(xbmc.getInfoLabel("VideoPlayer.Title")) # no original title, get
etc.etc.

