The script can be any command or script. If you choose to use a custom script, be sure to make the script executable before trying to use it.
Enable debug logging to see the output of your configured command or script in the Unmanic log file.
The following template replacements are available to your command or args. If you write one of these variables in your args, it will be substituted with the specified data from the current task.
:::note Variable substitutions are not applied to the script, only a script's args. :::
:::tip In some cases, you may need to place single quotes around these variables as it may contain characters that shell may otherwise attempt to parse. :::
Will be replaced with the ID of the library config that was used to process this file.
Eg.
--library='{library_id}'
Will be replaced with the path to the final output file in the Unmanic cache directory for this task.
Eg.
--processed-cache-file='{final_cache_path}'
Will be replaced with a JSON object list of files generated.
Only available when Run the command for each output file created by Unmanic. is unselected.
Eg.
--files='{output_files}'
Will be replaced with the full path to an output file generated by this task.
Only available when Run the command for each output file created by Unmanic. is selected.
Eg.
--output='{output_file_path}'
Will be replaced with the full path to the original source file for this task.
Eg.
--sourcefile='{source_file_path}'
Will be replaced with the size in bytes of the original source file for this task.
Eg.
--originalsize='{source_file_size}'
Run filebot "Automated Media Center" command on output files:
Only run the command when the all worker processes completed successfully.
(SELECTED)
Run the command for each output file created by Unmanic.
(SELECTED)
Command or script to execute.
filebot
Arguments to pass to the command or script.
-script fn:amc
--output "/library"
--action duplicate
--conflict skip
-non-strict
--log-file amc.log
--def unsorted=y music=y artwork=y
"ut_kind=multi" "ut_label=N/A" "ut_dir={output_file_path}"
Use Rsync to copy output files to another server:
Only run the command when the all worker processes completed successfully.
(SELECTED)
Run the command for each output file created by Unmanic.
(SELECTED)
Command or script to execute.
rsync
Arguments to pass to the command or script.
--relative
{output_file_path}
[email protected]:/library/
Only run the command when the all worker processes completed successfully.
(SELECTED)
Run the command for each output file created by Unmanic.
(UNSELECTED)
Command or script to execute.
/path/to/script.sh
Arguments to pass to the command or script.
--all_files='{output_files}' --original_file_size={source_file_size}