diff --git a/Media/lidarr_cleanup.sh b/Media/lidarr_cleanup.sh index d4776b7..1263594 100755 --- a/Media/lidarr_cleanup.sh +++ b/Media/lidarr_cleanup.sh @@ -197,11 +197,12 @@ fi DOCKER_TIMEOUT=15 LIDARR_CONTAINER="Lidarr" # container name on HOST1 -# Build path map from HOST1_LIDARR_PATH_MAP for translate_path() +# Build path map from MY_ID's Lidarr path map declare -A ARR_PATH_MAP -for key in "${!HOST1_LIDARR_PATH_MAP[@]}"; do - ARR_PATH_MAP["$key"]="${HOST1_LIDARR_PATH_MAP[$key]}" -done +local_path_map_var="${MY_ID}_LIDARR_PATH_MAP" +eval "for key in \"\${!${local_path_map_var}[@]}\"; do + ARR_PATH_MAP[\"\$key\"]=\"\${${local_path_map_var}[\$key]}\" +done" # Validate required vars — detect_hosts() should have set these require_var LIDARR_URL diff --git a/Media/lidarr_missing_art.sh b/Media/lidarr_missing_art.sh index 368a059..be69f1d 100755 --- a/Media/lidarr_missing_art.sh +++ b/Media/lidarr_missing_art.sh @@ -113,19 +113,20 @@ acquire_lock detect_hosts -# Build path map for translate_path() — container path → host path -declare -A ARR_PATH_MAP -for _key in "${!HOST1_LIDARR_PATH_MAP[@]}"; do - ARR_PATH_MAP["$_key"]="${HOST1_LIDARR_PATH_MAP[$_key]}" -done -unset _key - # HOST guard — Lidarr runs on HOST1 only if [[ -z "$LIDARR_URL" ]]; then echo "Lidarr not configured for $MY_ID — skipping" exit 0 fi +# Build path map from MY_ID's Lidarr path map +declare -A ARR_PATH_MAP +local_path_map_var="${MY_ID}_LIDARR_PATH_MAP" +eval "for _key in \"\${!${local_path_map_var}[@]}\"; do + ARR_PATH_MAP[\"\$_key\"]=\"\${${local_path_map_var}[\$_key]}\" +done" +unset _key + info "$MY_ID ($LOCAL_SERVER_NAME) — tools OK" log "$ICON_GEAR Config: url=${LIDARR_URL}" diff --git a/Media/upgrade_webhook_handler.sh b/Media/upgrade_webhook_handler.sh index 5f4a21c..72c935e 100755 --- a/Media/upgrade_webhook_handler.sh +++ b/Media/upgrade_webhook_handler.sh @@ -5,7 +5,7 @@ # # PURPOSE # ───────────────────────────────────────────────────────────────────────────── -# Triggered by Sonarr/Radarr/Lidarr OnUpgrade webhook (via webhook.php). +# Triggered by Sonarr/Radarr/Lidarr OnUpgrade webhook (via webhook_listener.js). # Pushes the upgraded item folder to every other mesh node immediately, then # triggers a library rescan on each remote arr so it accepts the new file as # ground truth without initiating a redundant quality search. diff --git a/Partnership/onboard_cancel.sh b/Partnership/onboard_cancel.sh index ba62191..1d89934 100755 --- a/Partnership/onboard_cancel.sh +++ b/Partnership/onboard_cancel.sh @@ -1,6 +1,6 @@ #!/bin/bash # ============================================================================================== -# ============================= Delete Keys ==================================================== +# ============================= Onboard Cancel ================================================= # ============================================================================================== # # PURPOSE diff --git a/common.sh b/common.sh index b60b4bc..de92f5b 100755 --- a/common.sh +++ b/common.sh @@ -1547,9 +1547,9 @@ _release_rsync_on_exit() { # Longest-match wins — prevents partial path collisions. # # Usage: -# declare -A ARR_PATH_MAP=(["/ext-music"]="/mnt/user/Music-New") +# declare -A ARR_PATH_MAP=(["/ext-music"]="/mnt/user/Music") # translate_path "/ext-music/Artist/Album/track.flac" -# Returns: /mnt/user/Music-New/Artist/Album/track.flac +# Returns: /mnt/user/Music/Artist/Album/track.flac # # If no match found — returns path unchanged (safe fallback).