I'm running the AMC script and use the the option "--conflict skip". I also use the email option to send notifications when files are processed.
My problem is that an email is only sent when files are successfully processed. Is there a configuration option to send emails when something is skipped or the process failed for some other reason?
AMC script - send email on conflict or error
Re: AMC script - send email on conflict or error
That might help you report errors, but it probably won't report ignored files.rednoah wrote:--def reportError=y Report errors via email
You can check the exit code of the amc script then send your own emails though. The amc script will return with exit code 0 only if at least one file has been processed successfully.
Re: AMC script - send email on conflict or error
Great, thank you.
Re: AMC script - send email on conflict or error
I wrote a little script to send an email when amc doesn't return 0 but on testing it seems that defining "reportError=y" actually does send a message when the script exits without processing any files. However, the message simply contains:
Would it be possible to have the message contain a few more details? E.g. The path/s that was/were passed to the script.Finished without processing any files
Re: AMC script - send email on conflict or error
The output does contain all the information you seek. You just happen to be looking at the last line of the output. You can capture the whole output and then grep the lines you want.
Re: AMC script - send email on conflict or error
I think maybe you misunderstood what I meant. I was saying the the default functionality of the amc script already sends an email if no files were processed, but the email doesn't contain any details just a message saying "Finished without processing any files".
I think this commit demonstrates what I meant when I asked if it was possible to include the path/s that was/were passed to the script in the email message:
https://github.com/despian/scripts/comm ... 0f1c99a648
I also noticed that a mail was not sent at all if an invalid path is passed to the script so I added a line to do that.
I'm using this forked version of the amc script on my setup now and it is working the way I wanted it to. If I were to submit a pull request for these changes would you consider merging them with the upstream version of amc?
I think this commit demonstrates what I meant when I asked if it was possible to include the path/s that was/were passed to the script in the email message:
https://github.com/despian/scripts/comm ... 0f1c99a648
I also noticed that a mail was not sent at all if an invalid path is passed to the script so I added a line to do that.
I'm using this forked version of the amc script on my setup now and it is working the way I wanted it to. If I were to submit a pull request for these changes would you consider merging them with the upstream version of amc?
Re: AMC script - send email on conflict or error
I'm not particularly interested in any changes in email reporting. Doing it inside the script itself was never a good idea, and it only exists because sending email via Windows CMD is an even worse idea. 
On Linux, I'd to it properly:

On Linux, I'd to it properly:
Code: Select all
filebot -script fn:sysinfo 2>&1 | mail -s "this is the subject" "to@address"