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

Make the language suffix coherent with --lang argument #57

Closed antznin closed 4 years ago

antznin commented 4 years ago

I'm not sure whether this is intentional or not, but the suffixed language appears to differ from the input language passed through --lang.

For example, if --lang fre is passed, the result suffix would be _fr. This makes the output srt hard to use in a script since the output filename of a given language code is non-deterministic. IMO, if --lang fre is passed as an argument, _fre should be the resulting suffix.

Otherwise, I have a couple other solutions to this problem :

Thanks for the script!

emericg commented 4 years ago

Yes it was intentional, mostly because I think 2 letter language code looked better. But at the same time the default language code is a 3 letter one, and I agree, it's not really consistent. I've changed it to use the same language code. I've also added a -x option to force a language suffix from the CLI.

antznin commented 4 years ago

That was quick. Thank you!