It might happen, even with non-strict, that some movies aren't matched (e.g. different year in the file compared to TheMovieDB).
Is there a way to have FileBot notify this failure?
I don't think it works with Pushover or similar, they seem to fire only on success.
Should this be something to be checked in the post-process script outside of FileBot?
Notification on failure
Notification on failure
I only work in black and sometimes very, very dark grey. (Batman)
Re: Notification on failure
Does --def reportError=y do what you want? I think error reporting only works with email notifications, but not with other custom notifications.
Alternatively, you can do your own error reporting if the filebot call returns a non-zero exit code. That way you can attach the entire console output as well as filebot will have stopped running.
Alternatively, you can do your own error reporting if the filebot call returns a non-zero exit code. That way you can attach the entire console output as well as filebot will have stopped running.
Re: Notification on failure
It would do exactly what I want, but as you mentioned it only does emails.
I'll use that for now, but for the sake of argument, how would the second option you mentioned work?
but I'm missing how I can
I'll use that for now, but for the sake of argument, how would the second option you mentioned work?
Code: Select all
# ... restofthescript ...
exit_code=$?
if [ $exit_code -eq 1 ]; then
echo "Error"
# whatever else
fi
exit $exit_code
I only work in black and sometimes very, very dark grey. (Batman)
Re: Notification on failure
1.
Run the amc script and redirect the console output to a file.
2.
Check the return code after running the amc script to see if it exited successfully, and if not, do your own error reporting as you see fit.
e.g.
Alternatively, if you're looking for a very specific error condition, then you could check the console output for certain keywords, and then run our own error reporting commands accordingly.
If you're on Linux, then that's bash basics. If you're on Windows, then it's possible with CMD, but probably painful, so best to go with PowerShell. It should be fairly straight forward.
Run the amc script and redirect the console output to a file.
2.
Check the return code after running the amc script to see if it exited successfully, and if not, do your own error reporting as you see fit.
e.g.
Code: Select all
if filebot -version; then
echo "FileBot works"
else
echo "FileBot doesn't work"
fi

If you're on Linux, then that's bash basics. If you're on Windows, then it's possible with CMD, but probably painful, so best to go with PowerShell. It should be fairly straight forward.
Re: Notification on failure
Does FileBot have specific exit codes for failures besides the Java codes for things like non-existing files or HTTP errors?
From ArgumentProcessor I only seem to understand that it exits 1 on any error and prints an error message depending on the class and stuff (findCause function).
Anyway, main issue is solved so I'll manage with the current solution.
From ArgumentProcessor I only seem to understand that it exits 1 on any error and prints an error message depending on the class and stuff (findCause function).
Anyway, main issue is solved so I'll manage with the current solution.
I only work in black and sometimes very, very dark grey. (Batman)
Re: Notification on failure
The error code indeed only indicates success or failure. The exact nature of the failure is only accessible by skimming the log.
e.g.
e.g.
Code: Select all
filebot -script fn:sysinfo > stdout.txt 2> stderr.txt
if cat stderr.txt | egrep "DNS|Network|Server"; then
echo "Some kind of network exception occurred"
fi