fix(lidarr_missing_art): log → info for section-level status lines
Section headers (reachable, counts, summaries) were using log() and invisible without --log. Per-item detail ([n/N] artist/album, fetched file names) stays log.
This commit is contained in:
@@ -107,7 +107,7 @@ if [[ -z "$LIDARR_URL" ]]; then
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
log " $MY_ID ($LOCAL_SERVER_NAME) — tools OK"
|
info "$MY_ID ($LOCAL_SERVER_NAME) — tools OK"
|
||||||
|
|
||||||
# ==============================================================================================
|
# ==============================================================================================
|
||||||
# ━━━ Status ━━━
|
# ━━━ Status ━━━
|
||||||
@@ -215,7 +215,7 @@ if ! curl_json "$LIDARR_URL/api/v1/system/status?apikey=$LIDARR_API_KEY" | jq -e
|
|||||||
notify "lidarr_missing_art failed — Lidarr API unreachable on $(hostname)" "Lidarr Missing Art" "warning"
|
notify "lidarr_missing_art failed — Lidarr API unreachable on $(hostname)" "Lidarr Missing Art" "warning"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
log " Reachable — $LIDARR_URL"
|
info "Lidarr reachable — $LIDARR_URL"
|
||||||
|
|
||||||
START=$(date +%s)
|
START=$(date +%s)
|
||||||
|
|
||||||
@@ -235,7 +235,7 @@ echo "━━━ $ICON_SYNC Building Album Directory Map ━━━"
|
|||||||
declare -A ALBUM_DIR_MAP
|
declare -A ALBUM_DIR_MAP
|
||||||
_artist_list=$(curl_json "$LIDARR_URL/api/v1/artist?apikey=$LIDARR_API_KEY")
|
_artist_list=$(curl_json "$LIDARR_URL/api/v1/artist?apikey=$LIDARR_API_KEY")
|
||||||
_map_artist_count=$(echo "$_artist_list" | jq '. | length')
|
_map_artist_count=$(echo "$_artist_list" | jq '. | length')
|
||||||
log " Fetching track files for $_map_artist_count artists..."
|
info "Fetching track files for $_map_artist_count artists..."
|
||||||
|
|
||||||
while IFS= read -r _artist_id; do
|
while IFS= read -r _artist_id; do
|
||||||
[[ -z "$_artist_id" ]] && continue
|
[[ -z "$_artist_id" ]] && continue
|
||||||
@@ -247,7 +247,7 @@ while IFS= read -r _artist_id; do
|
|||||||
done < <(echo "$_artist_list" | jq -r '.[].id')
|
done < <(echo "$_artist_list" | jq -r '.[].id')
|
||||||
unset _artist_list _map_artist_count _artist_id _album_id _track_path
|
unset _artist_list _map_artist_count _artist_id _album_id _track_path
|
||||||
|
|
||||||
log " Mapped ${#ALBUM_DIR_MAP[@]} albums with local tracks"
|
info "Mapped ${#ALBUM_DIR_MAP[@]} albums with local tracks"
|
||||||
|
|
||||||
# ==============================================================================================
|
# ==============================================================================================
|
||||||
# ━━━ Albums ━━━
|
# ━━━ Albums ━━━
|
||||||
@@ -264,7 +264,7 @@ if [[ -z "$albums" || "$albums" == "null" ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
total_albums=$(echo "$albums" | jq '. | length')
|
total_albums=$(echo "$albums" | jq '. | length')
|
||||||
log " Processing $total_albums albums..."
|
info "Processing $total_albums albums..."
|
||||||
|
|
||||||
while IFS=$'\t' read -r mbid artist_name album_name album_id; do
|
while IFS=$'\t' read -r mbid artist_name album_name album_id; do
|
||||||
raw_dir="${ALBUM_DIR_MAP[$album_id]:-}"
|
raw_dir="${ALBUM_DIR_MAP[$album_id]:-}"
|
||||||
@@ -332,7 +332,7 @@ wait
|
|||||||
ALBUM_FETCHED=$(wc -l < "$LIDARR_TMP/album_fetches" 2>/dev/null || echo 0)
|
ALBUM_FETCHED=$(wc -l < "$LIDARR_TMP/album_fetches" 2>/dev/null || echo 0)
|
||||||
ALBUM_FAILED=$(wc -l < "$LIDARR_TMP/album_fails" 2>/dev/null || echo 0)
|
ALBUM_FAILED=$(wc -l < "$LIDARR_TMP/album_fails" 2>/dev/null || echo 0)
|
||||||
ALBUM_MISSING=$(( ALBUMS_CHECKED - ALBUMS_COMPLETE ))
|
ALBUM_MISSING=$(( ALBUMS_CHECKED - ALBUMS_COMPLETE ))
|
||||||
log " Checked: $ALBUMS_CHECKED | Complete: $ALBUMS_COMPLETE | Needed art: $ALBUM_MISSING | Fetched: $ALBUM_FETCHED | Failed: $ALBUM_FAILED"
|
info "Checked: $ALBUMS_CHECKED | Complete: $ALBUMS_COMPLETE | Needed art: $ALBUM_MISSING | Fetched: $ALBUM_FETCHED | Failed: $ALBUM_FAILED"
|
||||||
|
|
||||||
# ==============================================================================================
|
# ==============================================================================================
|
||||||
# ━━━ Artists ━━━
|
# ━━━ Artists ━━━
|
||||||
@@ -349,7 +349,7 @@ if [[ -z "$artists" || "$artists" == "null" ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
total_artists=$(echo "$artists" | jq '. | length')
|
total_artists=$(echo "$artists" | jq '. | length')
|
||||||
log " Processing $total_artists artists..."
|
info "Processing $total_artists artists..."
|
||||||
|
|
||||||
while IFS=$'\t' read -r local_path mbid name; do
|
while IFS=$'\t' read -r local_path mbid name; do
|
||||||
local_path=$(translate_path "$local_path")
|
local_path=$(translate_path "$local_path")
|
||||||
@@ -427,7 +427,7 @@ wait
|
|||||||
ARTIST_FETCHED=$(wc -l < "$LIDARR_TMP/artist_fetches" 2>/dev/null || echo 0)
|
ARTIST_FETCHED=$(wc -l < "$LIDARR_TMP/artist_fetches" 2>/dev/null || echo 0)
|
||||||
ARTIST_FAILED=$(wc -l < "$LIDARR_TMP/artist_fails" 2>/dev/null || echo 0)
|
ARTIST_FAILED=$(wc -l < "$LIDARR_TMP/artist_fails" 2>/dev/null || echo 0)
|
||||||
ARTIST_MISSING=$(( ARTISTS_CHECKED - ARTISTS_COMPLETE ))
|
ARTIST_MISSING=$(( ARTISTS_CHECKED - ARTISTS_COMPLETE ))
|
||||||
log " Checked: $ARTISTS_CHECKED | Complete: $ARTISTS_COMPLETE | Needed art: $ARTIST_MISSING | Fetched: $ARTIST_FETCHED | Failed: $ARTIST_FAILED"
|
info "Checked: $ARTISTS_CHECKED | Complete: $ARTISTS_COMPLETE | Needed art: $ARTIST_MISSING | Fetched: $ARTIST_FETCHED | Failed: $ARTIST_FAILED"
|
||||||
|
|
||||||
END=$(date +%s)
|
END=$(date +%s)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user