emericg / OpenSubtitlesDownload

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

Respect opt_languages #20

Closed umpirsky closed 7 years ago

umpirsky commented 7 years ago

I set:

opt_languages = ['sr,hr']

It shows other languages too:

screenshot from 2016-08-12 21-42-16

emericg commented 7 years ago

Well, it looks like you are right! The solution seems to be using only 3 letters language code (so in your case, ['scc,hrv']). I'll look at this and maybe update the documentation of opt_languages if I don't find any fix...

umpirsky commented 7 years ago

@emericg That worked, thanks. It didn't work with srp thought.If you look at https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes you'l see that the ISO 639-2/T code srp deprecated the ISO 639-2/B code scc.

emericg commented 7 years ago

The changes have made their way into the 3.5 release, thanks for the report. Regarding the scc langage code deprecated in favor of srp, that's an issue for opensubtitles.org. They maintain their "own" list of codes that's probably not updated much (http://www.opensubtitles.org/addons/export_languages.php) and that's the one we link to in the wiki ;-)

umpirsky commented 7 years ago

@emericg Cool. Thanks for making this awesome tool.