Exclude hasFile=false entries from move targets — nothing to physically move
This commit is contained in:
@@ -201,7 +201,7 @@ RESULTS=$(echo "$MOVIES_RESPONSE" | jq \
|
||||
|
||||
map(
|
||||
{
|
||||
title, id, studio, certification, rootFolderPath, genres,
|
||||
title, id, studio, certification, rootFolderPath, genres, hasFile,
|
||||
is_anime: is_anime,
|
||||
is_kids: is_kids,
|
||||
is_junk: is_junk
|
||||
@@ -268,7 +268,12 @@ if [[ "$MOVE_MODE" == true ]]; then
|
||||
|
||||
build_arr_path_map "RADARR"
|
||||
|
||||
MOVE_TARGETS=$(echo "$RESULTS" | jq -c '[.[] | select((.forward_anime_miss or .forward_kids_miss) and (.is_junk | not))]')
|
||||
# hasFile==false entries have nothing to physically move (some monitored titles simply
|
||||
# were never downloaded — confirmed live: "Biohazard 4: Incubate" had hasFile=false even
|
||||
# in the cache from before this run started, not something this script broke). Moving
|
||||
# Radarr's DB pointer for those is harmless but pointless — skip them here; they still
|
||||
# show up correctly in the report above as a classification finding.
|
||||
MOVE_TARGETS=$(echo "$RESULTS" | jq -c '[.[] | select((.forward_anime_miss or .forward_kids_miss) and (.is_junk | not) and .hasFile)]')
|
||||
MOVE_COUNT=$(echo "$MOVE_TARGETS" | jq 'length')
|
||||
|
||||
if [[ "$MOVE_COUNT" -eq 0 ]]; then
|
||||
|
||||
Reference in New Issue
Block a user