Hi,
I'm using AMC on completed torrents, with Transmission on OSX and the transmission-postprocess script. I'd like to add an external script executed using"--def exec", and I have a question about the order in which the script gets called.
Does AMC match/process every file from the torrent before starting to run the external script on the processed files? Or is the external script run on each file as they are matched/processed? And does AMC wait for the external script to complete before moving on? Or does it just run the external script multiple times simultaneously?
I'm wanting to re-encode certain TV shows using HandbrakeCLI after they are matched/processed using AMC. If I download a whole season at once, it would be nice to let AMC do it's thing before the re-encodes start.
Thanks.
AMC workflow using "--def exec"
Re: AMC workflow using "--def exec"
Depends on your --def exec template. It'll generate a command for each processed file, but each unique command will only be executed once.Does AMC match/process every file from the torrent before starting to run the external script on the processed files?
e.g. one single call:
Code: Select all
--def exec="echo hello"
Code: Select all
--def exec="echo {fn}"
--def exec commands are called after everything has been processed successfully.Or is the external script run on each file as they are matched/processed?
Yes, commands will be called in sequence.And does AMC wait for the external script to complete before moving on?
-
- Posts: 9
- Joined: 03 Feb 2015, 23:46
Re: AMC workflow using "--def exec"
Excellent - thanks for the quick and clear response.
Re: AMC workflow using "--def exec"
Follow up question:
If I have multiple commands I want to run, can I use multiple "--def exec" options on the same filebot.sh command line?
e.g., do chmod, chown, an rsync, an rm, and then curl (to trigger Plex update of Movies section, don't want ALL).
If I have multiple commands I want to run, can I use multiple "--def exec" options on the same filebot.sh command line?
e.g., do chmod, chown, an rsync, an rm, and then curl (to trigger Plex update of Movies section, don't want ALL).
Re: AMC workflow using "--def exec"
Whatever you pass in will be run on the shell, so you can do multiple commands as usual:
Though I'd recommend making your own shell script that does all your stuff and then call that.
Code: Select all
--def exec="echo A && echo B && echo C"
Re: AMC workflow using "--def exec"
Hi, I know you just stated that unique commands are executed only once each depending on your --def exec command, but I'm finding this to not be the case.
Here's the relevant input from the log, more or less:
and I see at the bottom:
Sure enough, the script gets called 10 times in a row. Is there something going on here I'm completely missing?
Here's the relevant input from the log, more or less:
Code: Select all
Parameter: ut_kind = multi
Parameter: ut_dir = /home/hd24/shinomory/files/data/TV/TV.Fake.TV.Season.S02
Parameter: artwork = false
Parameter: extractfolder = /home/hd24/shinomory/torrents/extracted
Parameter: skipExtract = y
Parameter: music = n
Parameter: exec =". ~/doit.sh"
Code: Select all
Processed 10 files
Execute: . ~/doit.sh
Execute: . ~/doit.sh
Execute: . ~/doit.sh
Execute: . ~/doit.sh
Execute: . ~/doit.sh
Execute: . ~/doit.sh
Execute: . ~/doit.sh
Execute: . ~/doit.sh
Execute: . ~/doit.sh
Execute: . ~/doit.sh
Re: AMC workflow using "--def exec"
Thanks for the post! Before a real human comes by, please make sure your report has all the following points checked:
Please read How to Request Help and Fix Problems, Report Bugs, Get Features
- What are you trying to do achieve? What's not working? What have you tried so far?
- Include screenshots, logs or filenames (i.e. demonstrate the issue)
- Include basic information (i.e. sysinfo output)
