Open yosi-dediashvili opened 10 years ago
The implementation of the discover_title_from_query
migyt fail to return the correct Title.
The bug is inside the OpenSubtitles provider actually, in the get_title_by_query
method: we count each imdbid
returned from SearchSubtitles
and select the one with most appearances. So, we might get the wrong title simply because at appeared more times.
We can fix this by adding another logic to the algorithm: For each imdbid that the search returns, extract the title, and compare it to the query. If it is a complete match, select it, ignoring the appearances count.
Turns out the above method does not improve the situation (It works only when we query for the title name exactly).
We need to figure out why OpenSubtitles started returning strange results from their SearchSubtitle methods (When we query for "The Matrix", we get ~230 results for "The Matrix Reloaded", another ~250 for "The Matrix Revolution", and ~30 for "The Matrix"). It clearly wasn't the case when the module was first implemented.
This also involves a partial implementation of the OpenSubtitles provider.