Closed codingCoffee closed 3 years ago
Actually yes! Thank you for suggesting this!
While animdl was intended for automation and me even optimising the code for it to seamlessly run in a remote server, I never thought this through.
There aren't many cases where animdl needs to abruptly stop except for when the streaming configuration has mismatched or when the content doesn't get found. Due to this, I didn't really mention about it in the documentations.
So, now animdl has 4 possible exit codes:
0: For returning a successful completion of the program.
1: For returning a exception in the program. (Handled by click)
2: For returning no content found during search, or 404
3: For returning failed streamer configurations
I have tried my best to keep it even with the standard approach of returncodes. Thank you again, for suggesting this!
Note: This isn't added in the codebase, but in the cli portion of it because of obvious reasons.
The use case for the problem is for automation. If a better strategy can be suggested, that would also work. Currently there is no way to know if animdl exited because an episode was not found or if exited after playing an episode.