Skip to content

Commit

Permalink
Added debug messages for cases where the AMC script is not invoked.
Browse files Browse the repository at this point in the history
  • Loading branch information
jlesage committed Dec 19, 2024
1 parent 07e6236 commit 83d0c1d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions rootfs/etc/services.d/amc/run
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ log() {
echo "$*"
}

debug() {
is-bool-val-false "${CONTAINER_DEBUG:-0}" || log "$*"
}

process_filebot_output() {
while read LINE; do
log "$LINE"
Expand Down Expand Up @@ -93,11 +97,13 @@ while true; do

# Do not invoke the AMC script if input folder is empty.
if ! ls -1qA "$AMC_INPUT_DIR" | grep -q .; then
debug "Skipping AMC script invocation: input folder is empty."
continue
fi

# Do not invoke the AMC script if input folder did not change.
if ! WATCHDIR_HASH_changed "$AMC_INPUT_DIR"; then
debug "Skipping AMC script invocation: input folder did not change."
continue
fi

Expand Down

0 comments on commit 83d0c1d

Please sign in to comment.