Make all arr library-list fetches cache-first with live fallback
Every script that fetches the full Lidarr/Sonarr/Radarr tracked-library list now goes through arr_get_tracked_data() instead of hitting the API directly -- cache-first when fresh, live fetch as fallback when stale, waits out an active rescan before either. Per-item file data (trackFile/ episodefile/moviefile) stays live-only everywhere, since that's the actual disk-truth these scripts' decisions depend on and was never part of what's cached. Also adds arr_cache_prefill.sh to CRITICAL_MAINTENANCE_SCRIPTS (30min tier) with a short 1min wait ceiling, so the cache stays consistently fresh instead of only refreshing whenever some other script happens to write through. A full cache refresh for all three arrs measured at ~12s total live -- nothing like the multi-hour cost of an actual rescan.
This commit is contained in:
@@ -359,6 +359,7 @@
|
||||
CRITICAL_MAINTENANCE_SCRIPTS=(
|
||||
"Docker_Essentials/downloaders_reset.sh" # clear stuck download states every 30min
|
||||
"Media/play_state_sync.sh" # sync watched/resume state across Emby + Jellyfin
|
||||
"Arrs_Stack/arr_cache_prefill.sh ARR_PREFILL_WAIT_MINUTES=1" # keep the shared arr tracked-data cache fresh — a live fetch+write takes seconds, not the boot-time 10min wait ceiling
|
||||
)
|
||||
|
||||
# Shares synced every 30 minutes — defined per host in host*.conf.
|
||||
|
||||
Reference in New Issue
Block a user