emericg / OpenSubtitlesDownload

Automatically find and download the right subtitles for your favorite videos!
https://emeric.io/OpenSubtitlesDownload
GNU General Public License v3.0
588 stars 64 forks source link

--auto switch #11

Closed 097115 closed 10 years ago

097115 commented 10 years ago

There are also some problems with --auto switch – first, it doesn't seem to work (besides, for some reason it also suggests S04E02 as one of the possibilities – even though it has detected the number of the episode correctly):

097115 on Talisker @ ~/Downloads> subs --auto Downton.Abbey.2013.Christmas.Special.HDTV.x264-FoV.mp4

>> Title: "Downton Abbey" Episode #4.9
>> Filename: Downton.Abbey.2013.Christmas.Special.HDTV.x264-FoV.mp4
>> Available subtitles:
[1] "Downton.Abbey.S04E09.HDTV.x264-FoV.srt" > "HI"
[2] "Downton Abbey S04E02 HDTV x264 FoV.Hi.srt" > "HI"
[0] Cancel search
>> Enter your choice (0-2): 0
Cancelling search...

and if I change opt_selection_mode in the script itself to manual, then it just downloads the wrong episode:

097115 on Talisker @ ~/Downloads> subs Downton.Abbey.2013.Christmas.Special.HDTV.x264-FoV.mp4
>> Downloading 'English' subtitles for '"Downton Abbey" Episode #4.3'
2014-01-12 08:33:27 URL:http://dl.opensubtitles.org/en/download/filead/src-api/vrf-49a6de9dd0/1953752720.gz [21783/21783] -> "-" [1]

(subs is my alias for the script; and that seems to be the file in question).

emericg commented 10 years ago

Hi, thanks for reporting this bug!

Actually, we have a couple problem overlapping here: 1/ The --auto CLI switch wasn't correctly wired internaly, I fixed that 2/ A subtitles has been uploaded for the wrong file in the OS database. Not much we can do about that unfortunatly... 3/ The "automatic" download was choosing the subtitles with the higher download count, and in this case, choosing the wrong one (4x02 instead of 4x09). I did a bit of research and in case of a bad upload, the first result is usually correct (totally empirical results), so now the automatic downloader will just choose the first subtitles!

I fixed a couple of other bugs, and I think I will take a few days to do some testing then release a 3.1 version.