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

Exit codes #31

Closed setaur closed 6 years ago

setaur commented 6 years ago

It would be nice to have different than 0 exit code if none subtitles were found.

emericg commented 6 years ago

Hi, I'm open to it but what should I put?

I was thinking about something like this:

# ==== Return codes ============================================================
#
# -1: Success but NO subtitles downloaded
#  0: Success and subtitles downloaded
#  2: Failure
setaur commented 6 years ago

Looks great!

emericg commented 6 years ago

Ok I've finally commited the following: (using negative exit code was making me nervous)

# ==== Exit codes ==============================================================
# 0: Success and subtitles downloaded
# 1: Success but no subtitles found
# 2: Failure

I will not release the next version (3.6) right away so you still got time to comment on this ;-)

setaur commented 6 years ago

That will work for me, thanks!