Commit Graph
1038 Commits
Author SHA1 Message Date
Gmer4Lfe eb64e52815 Add lidarr_release_fixer.sh — daily fix for wrong MusicBrainz release editions
Reads MUSICBRAINZ_ALBUMID from FLAC (vorbis block type 4) and MP3 (ID3v2 TXXX)
files, matches against Lidarr's known releases, switches monitored=true to the
correct one, and queues RefreshArtist. Runs before lidarr_cleanup.sh in the
daily job list so the strike system doesn't act on files that just needed a
release correction.
2026-06-27 18:06:22 -04:00
Gmer4Lfe 26fb409da5 Fix Emby 4.9 API breakage in session report — update activity types and Items UserId requirement; fix local outside function in cert_monitor 2026-06-27 14:04:53 -04:00
Gmer4Lfe 2d76d10c9d docker_watchdog: skip crash-loop flag for containers that exit cleanly (exit code 0) 2026-06-27 13:48:08 -04:00
Gmer4Lfe 0401d872e4 Script audit: fix stale names, header mismatches, HOST1-hardcoded path maps in lidarr scripts 2026-06-27 13:42:06 -04:00
Gmer4Lfe c9a0ad187b Fix editor horizontal click offset — force inline fontFamily to override Unraid SPA clear-sans 2026-06-27 13:20:03 -04:00
Gmer4Lfe 0aa5851549 Fix editor line-height mismatch caused by Unraid SPA CSS override
Unraid 7's React CSS overrides line-height: 1.5 on textareas to normal.
vvRestoreEditorPrefs() only called vvFontSize() for non-default sizes, so
the inline style that overrides Unraid's CSS was never set for the default
12px case — leaving Firefox to render at ~14px while our code calculated
positions at 18px, putting the cursor 2-3 lines above where clicked.
Now always calls vvFontSize() so the inline lineHeight is always forced.
2026-06-27 13:05:31 -04:00
Gmer4Lfe ef7bc127b6 Fix platform_is_service_enabled to match Unraid's actual cfg format
Unraid quotes values (DOCKER_ENABLED="yes") and uses SERVICE="enable" for
libvirt — the old patterns matched nothing, so docker_watchdog always skipped.
2026-06-27 12:34:12 -04:00
Gmer4Lfe d8e3732f8d Fix Emby auth header and arr cleanup pre-flight scan
Emby 4.9.5 rejects X-Api-Key — notify_emby_scan() now uses X-Emby-Token
consistently with emby_api(). Radarr v6 changed DownloadedMoviesScan to
require a path parameter — both cleanup scripts now use ProcessMonitoredDownloads
which achieves the same pre-flight intent without a path.
2026-06-27 12:28:58 -04:00
Gmer4Lfe 07b41559b6 Wire LIDARR_RECOVERY (and SONARR/RADARR) through detect_hosts()
All three *_RECOVERY vars were missing from detect_hosts() so the conf-file
values were never surfaced — LIDARR_RECOVERY defaulted to false even though
HOST1_LIDARR_RECOVERY=true, keeping Lidarr disabled in arrs_failed_stalled_recovery.
2026-06-27 12:16:51 -04:00
Gmer4Lfe 6feb7ff3fa Fix lidarr_missing_art: correct clearlogo.png filename and Music path map 2026-06-27 11:56:12 -04:00
Gmer4Lfe bafabe5fb3 Fix local-outside-function error in docker_network_connect and misuse of warn for background script launches in array_started 2026-06-27 11:06:10 -04:00
Gmer4Lfe ccaf19cfe4 Fix editor click alignment in Firefox and enable arr cleanup scripts in daily maintenance 2026-06-26 22:35:47 -04:00
Gmer4Lfe 97dfd522d0 Switch CLAUDE.md to reflect live dev/prod split 2026-06-26 21:51:29 -04:00
Gmer4Lfe f92ee4064b Add full banner headers to all scripts across the codebase
Every script now has the established header format: PURPOSE with ─────── separator,
OPERATIONAL MODEL, DESIGN PRINCIPLES, OPERATIONAL SAFEGUARDS, CONFIGURATION, and
RUNTIME MODES — structured with full ====== banner sections throughout.

Orchestrators converted from compact ── inline format to full banners. Stale
emby-fallback and dirty sync references removed from Plugin/user_script_plug-in.sh.
2026-06-26 18:50:05 -04:00
Gmer4Lfe 1003bee72a Replace emby dirty sync references with play_state_sync in comments and docs 2026-06-26 17:56:28 -04:00
Gmer4Lfe 638aba20c0 Rename Lldap-Gmer4Lfe to Lldap and guard local containers in cleanup 2026-06-26 17:56:20 -04:00
Gmer4Lfe fbe6a54e41 Fix three image cleanup gaps: weekly restart prune, mode-aware rebuild error, monthly orphan sweep
docker_weekly_restart.sh was missing the trailing dangling prune that daily_restart has.
docker_update.sh rebuild failure message always named docker_daily_restart.sh regardless of mode.
docker_prune_images.sh --all added to monthly — the only scheduled path that removes tagged orphan images.
2026-06-25 21:37:20 -04:00
Gmer4Lfe d058cf15c9 Add favorite sync to play_state_sync — union semantics, music first
Favorites on any server propagate to all others; never unmarks.
Covers MusicArtist, MusicAlbum, Movie, Series (Audio tracks future).
Provider map extended to include FAV_TYPES alongside SYNC_TYPES,
with Series/Episode TVDB IDs namespaced to avoid collisions.
2026-06-22 23:42:39 -04:00
Gmer4Lfe 4de10a7d01 Drop Audio from PLAY_SYNC_TYPES — music library too large for play state sync 2026-06-22 23:32:50 -04:00
Gmer4Lfe 01e4f97361 Hold DNS cutover until play_state_sync succeeds on handback
Retries up to PLAY_SYNC_HANDBACK_RETRIES times (default 5, 60s apart)
before giving up — one successful run catches all state regardless of
outage length, so users land on current watch state after DNS flips.
2026-06-22 23:22:06 -04:00
Gmer4Lfe 284896fbd9 Update TIER1_WRITEBACK_DELAY comment — no longer Emby-specific 2026-06-22 23:16:36 -04:00
Gmer4Lfe c4d4d8160d Replace Emby dirty-sync workaround with play_state_sync in handback
Emby now runs continuously on both hosts — play_state_sync via API
handles watch state reconciliation, making the 30-min dirty rsync
redundant. Handback runs play_state_sync --wait before DNS cutover
so users land on current state after a failover event.

- Emby removed from FALLBACK_HOST1_TIER1 (always running)
- Emby dirty sync removed from HOST1_CRITICAL_SYNC_SHARES
- Emby writeback removed from FALLBACK_HOST1_WRITEBACK_TIER1
- play_state_sync gains --wait flag (uses lock wait mode for handback)
- Tier 1 emby-fallback special case removed from handback writeback loop
- play_state_sync --wait added as Step 7 in handback, before DNS cutover
2026-06-22 23:14:36 -04:00
Gmer4Lfe 438de76655 Fix PROV_LOOKUP build: paginate by type to avoid Jellyfin mixed-query sort corruption
Single mixed Movie,Episode,Audio query caused Jellyfin to reorder items unpredictably,
pushing most episodes past the page limit and leaving PROV_LOOKUP empty — every
Emby→Jellyfin push silently failed with 'item not found'. Also removes the
ExcludeLocationTypes=Virtual param which caused the same corruption in JF.
2026-06-22 13:54:19 -04:00
Gmer4Lfe 86b8e894e5 Bypass PHP chain in array_stop_jobs — call array_stopping.sh directly via run_job.sh
PHP scheduler load at shutdown time can fail silently (errors suppressed); a failed PHP call meant the stop script never ran without any visible indication.
2026-06-22 12:45:31 -04:00
Gmer4Lfe 719ca016f4 Fix install wizard gaps: add Jellyfin to TRANSCODE_SERVERS template, add Emby/JF API key checklist checks, fix setup guide var names to HOST1_ prefix 2026-06-19 23:52:40 -04:00
Gmer4Lfe 2b8571c52c Remove require_partnership gate from play_state_sync — it is a local Emby↔Jellyfin operation and must run regardless of partnership status 2026-06-19 23:52:36 -04:00
Gmer4Lfe 585174ee94 Fix play state sync: Played=true must be primary authority key over resume-only state 2026-06-19 23:10:23 -04:00
Gmer4Lfe 3fb6207f53 Audit and update all READMEs and manuals to match current codebase 2026-06-19 23:00:19 -04:00
Gmer4Lfe bf3e7cc2c4 Storage-mode awareness pass + doc update for System_Essentials through Partnership
All state/data file paths in scripts and PHP now resolve via STATE_DIR / DATA_DIR /
PERSISTENT_CONF_CACHE instead of hardcoded /boot/config/ or /tmp/ paths, so the
ecosystem works in both internal and appdata storage modes.

PHP layer (watchdog.php, partnership.php, fallback.php, monitor.php, snapshot.php,
config.php): all state reads switched to STATE_DIR constant; remote state reads use
the new vv_remote_state_cmd() helper which resolves the remote's SCRIPTS_DIR via
their varaverk.cfg before building the path.

conf_sync.sh: fixed SCRIPTS_ROOT → SCRIPTS_DIR bug on MY_CONF path; added
_remote_scripts_dir() to resolve partner's SCRIPTS_DIR before SCP pull.

fallback.php page: added controls card (PARTNERSHIP_ENABLED, FALLBACK_ENABLED,
FALLBACK_RSYNC_ENABLED toggles), status grid, and settings card.

README and Manual updated for System_Essentials, Watchdogs, Fallback, Rsync,
Media, Monitors, Orchestrators, Partnership: added new scripts (conf_sync,
conf_cache_save/restore, conf_cache_watchdog, play_state_sync, start_webhook_listener,
upgrade_webhook_handler), corrected all stale /boot/config/ state file paths to
$STATE_DIR/$DATA_DIR, noted webgui/php_fpm/mover/user_scripts scripts moved to
Plugin/unraid/System_Essentials, fixed start_webhook_listener.sh header (Node.js,
not PHP -S).
2026-06-19 19:32:39 -04:00
Gmer4Lfe 0564580605 Make PARTNERSHIP_ENABLED the authoritative gate for all cross-server operations
Adds require_partnership() to common.sh — exits cleanly when PARTNERSHIP_ENABLED=false.
Removes FALLBACK_PARTNERSHIP_REQUIRED toggle — partnership is now always required,
not optional. Cross-server scripts (rsync, conf sync, fallback, arr sync, play state,
backup verify) all call require_partnership after detect_hosts.
2026-06-19 18:27:41 -04:00
Gmer4Lfe 7a12c3eee6 Fix watchdog orchestrator schedule comment — every 15 min not every minute 2026-06-19 18:08:29 -04:00
Gmer4Lfe 82810ab168 Add conf_cache_watchdog.sh — watchdog-driven persistent conf backup
Writes partner confs from RAM cache to /boot/config/.cache/vv/d/ while
remote is offline, and removes the backup when remote comes back. Called
each minute via SYSTEM_WATCHDOG_SCRIPTS so crashes and power loss are
covered — not just graceful shutdowns.
2026-06-19 18:06:31 -04:00
Gmer4Lfe 4749e5857c Relocate conf cache to more discrete paths 2026-06-19 17:56:17 -04:00
Gmer4Lfe 28d434b76c Propagate new fallback model to all remaining script references
All FALLBACK_${MY_ID}_COVERS_${REMOTE_ID}_TIER* references updated to
FALLBACK_${REMOTE_ID}_TIER* across fallback_test.sh, partnership_manager.sh,
docker_update.sh, mesh_monitor.sh, and monitor.php. mesh_monitor.sh drops
the inner covering-host loop — tier data now lives in the covered host's own
conf so no cross-host scan is needed. monitor.php reads from the covered
host's conf file rather than the local host's.
2026-06-19 17:49:26 -04:00
Gmer4Lfe b27b2d62f5 Flip fallback coverage model: each host defines its own recovery profile
Previously HOST1 defined what it would run for HOST2 (FALLBACK_HOST1_COVERS_HOST2_TIER*).
Now each host defines what it wants run when IT goes down (FALLBACK_HOST1_TIER*), and the
covering server reads the down host's conf via the RAM/persistent cache.

get_tier_containers() reads FALLBACK_${REMOTE_ID}_TIER* instead of
FALLBACK_${MY_ID}_COVERS_${REMOTE_ID}_TIER*. Tier data migrated to the correct host confs.
Writeback paths and delays were already REMOTE_ID-based — no change needed there.
2026-06-19 17:44:53 -04:00
Gmer4Lfe 7332eb81e0 Add persistent partner conf backup across reboots
conf_cache_save.sh runs first on array stop — snapshots partner confs from RAM
cache to /boot/config/varaverk/conf_bak/ before anything else shuts down.

conf_cache_restore.sh runs after conf_sync.sh on array start — if partner was
unreachable and RAM cache is incomplete, loads the backup into RAM then removes
it. Normal reboots: backup written, fresh pull succeeds, backup deleted unused.
Edge case (partner down at boot): backup fills the gap so fallback.sh has the
partner vars it needs to operate correctly.
2026-06-19 17:40:46 -04:00
Gmer4Lfe ad98d41041 Parity card: show correct operation label (rebuild vs check vs sync) from mdResyncAction 2026-06-19 11:19:15 -04:00
Gmer4Lfe 3c20c835da Fix expand button: add unapi class to opt out of Unraid orange button styling 2026-06-19 11:16:12 -04:00
Gmer4Lfe f42ecc8464 Add docker actions, arr profile enforcer, monitor caching, and web file symlink
Web files now served via symlink to the git repo so git pull changes survive
reboots without rebuilding the txz. Also includes: docker pull/rebuild/restart
with live log streaming, arr_profile_enforcer for Sonarr/Radarr quality
profiles, monitor page cache fix (background writer now in cron), and
ARR_KIDS/SONARR/RADARR profile name vars in master.conf.
2026-06-19 11:09:40 -04:00
Gmer4Lfe ac2986b141 Extend conf_populate.sh with all auto-detectable fields
Adds SSH key (hostname convention), arr path maps (docker volume mounts),
Authelia container + config path, boot device storage mode detection,
and master.conf HOST identity + Gitea container. Also fixes RADARR_MOVIE_ROOT
→ RADARR_MOVIES_ROOT to match the variable name used by all other scripts.
2026-06-14 22:42:44 -04:00
Gmer4Lfe e5169b241e Sync master.conf template: add RESTART_VERIFY_WAIT 2026-06-14 22:17:01 -04:00
Gmer4Lfe 12d04803bd Add DOWNLOAD_WEBHOOK_ENABLED and RSYNC_MERGE_ENABLED to master.conf template 2026-06-14 22:11:37 -04:00
Gmer4Lfe f2a1a930dd Update GPU transform for --gpus "device=UUID" style; keep --runtime=nvidia fallback 2026-06-14 22:07:32 -04:00
Gmer4Lfe 7da9018378 Auto-detect remote GPU and rewrite XML config on deploy — NVIDIA/Intel/AMD/none 2026-06-14 21:56:42 -04:00
Gmer4Lfe 978a5865a7 Add webhook setup, media seed, and listener start to onboarding (steps 9b-9d) 2026-06-14 21:40:25 -04:00
Gmer4Lfe 5d16b902cc Extend download webhook to all grabs, not just upgrades; add DOWNLOAD_WEBHOOK_ENABLED toggle 2026-06-14 21:34:54 -04:00
Gmer4Lfe 554822fc6a Exclude named profiles from merge auto-promote; add RSYNC_MERGE_ENABLED toggle 2026-06-14 21:34:49 -04:00
Gmer4Lfe 11f3492d9d Add arr upgrade webhook listener and setup — closes propagation window without manual arr config 2026-06-14 18:33:33 -04:00
Gmer4Lfe 38916f8375 Add upgrade webhook — close propagation window on arr quality upgrades 2026-06-14 16:55:26 -04:00
Gmer4Lfe 3c303210a3 Add --merge-run to rsync and --force to arr_sync for authoritative node compliance 2026-06-14 15:51:28 -04:00