fix: wait for every file in season packs
This commit is contained in:
parent
20530d71b8
commit
90de3a31fd
1 changed files with 7 additions and 1 deletions
|
|
@ -68,8 +68,14 @@ if [ ! -d "$DIR" ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
EXPECTED_FILES="$(find "$DIR" -type f \( -iname '*.mkv' -o -iname '*.mp4' -o -iname '*.avi' \) | wc -l | tr -d ' ')"
|
||||||
|
if [ -z "$EXPECTED_FILES" ] || [ "$EXPECTED_FILES" -lt 1 ] || [ "$EXPECTED_FILES" -gt 100 ]; then
|
||||||
|
log "FEHLER: ungueltige Anzahl Videodateien: ${EXPECTED_FILES:-0} - kein Move"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
# Lease registrieren, solange der SAB-Job und sein Quellpfad noch sichtbar sind.
|
# Lease registrieren, solange der SAB-Job und sein Quellpfad noch sichtbar sind.
|
||||||
START_PAYLOAD="$(json_payload action start category "$CATEGORY" directory "$DIR" release "$NZB_NAME" cleanName "$CLEAN_NAME")"
|
START_PAYLOAD="$(json_payload action start category "$CATEGORY" directory "$DIR" release "$NZB_NAME" cleanName "$CLEAN_NAME" expectedFiles "$EXPECTED_FILES")"
|
||||||
START_RESPONSE="$(handoff "$START_PAYLOAD" 2>>"$LOGFILE")" || {
|
START_RESPONSE="$(handoff "$START_PAYLOAD" 2>>"$LOGFILE")" || {
|
||||||
log "FEHLER: n8n-Handoff konnte nicht registriert werden - kein Move"
|
log "FEHLER: n8n-Handoff konnte nicht registriert werden - kein Move"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue