all scripts calling for emby are now consolidated to the main variables with hosts
This commit is contained in:
+18
-22
@@ -91,6 +91,18 @@
|
||||
HOST1_SSH_KEY="/root/.ssh/Gmer4Lfe-rsync-key"
|
||||
HOST2_SSH_KEY="/root/.ssh/Jayred365-rsync-key"
|
||||
|
||||
# Emby — per-host container name, URL and API key.
|
||||
# Defined once here — referenced by transcode_manager.sh, emby_session_report.sh,
|
||||
# emby_database_repair.sh, critical_shares_maintenance.sh and TRANSCODE_SERVERS array.
|
||||
# API key: Emby Dashboard → API Keys → + New Key
|
||||
HOST1_EMBY_CONTAINER="Emby"
|
||||
HOST1_EMBY_URL="http://localhost:8096"
|
||||
HOST1_EMBY_API_KEY="0c27448d93a7431f9ac63569f7655829"
|
||||
|
||||
HOST2_EMBY_CONTAINER="Emby-Jayred365"
|
||||
HOST2_EMBY_URL="http://localhost:8096" # same port — different server, different key
|
||||
HOST2_EMBY_API_KEY="your-host2-emby-api-key"
|
||||
|
||||
# ━━━ Logging ━━━
|
||||
# Controls verbose [LOG] output across all scripts.
|
||||
# true = show detailed [LOG] lines — useful for debugging or first-time setup
|
||||
@@ -1132,22 +1144,16 @@ HOST2_RADARR_RECOVERY=true # Anime_Movies import recovery
|
||||
# Keep Tdarr on SSD. Use tdarr_cleanup.sh for Tdarr orphan management.
|
||||
|
||||
TRANSCODE_SERVERS=(
|
||||
"Emby|http://localhost:8096|0c27448d93a7431f9ac63569f7655829|emby"
|
||||
# "Emby-Jayred365|http://HOST2-TAILSCALE-IP:8096|his-api-key|emby" # his Emby temporarily
|
||||
# "Jellyfin|http://localhost:8097|jellyfin-api-key|jellyfin" # test Jellyfin instance
|
||||
# "Plex|http://localhost:32400|plex-token|plex" # Plex if needed
|
||||
"${HOST1_EMBY_CONTAINER}|${HOST1_EMBY_URL}|${HOST1_EMBY_API_KEY}|emby"
|
||||
# "${HOST2_EMBY_CONTAINER}|${HOST2_EMBY_URL}|${HOST2_EMBY_API_KEY}|emby" # his Emby temporarily
|
||||
# "Jellyfin|http://localhost:8097|jellyfin-api-key|jellyfin" # test Jellyfin instance
|
||||
# "Plex|http://localhost:32400|plex-token|plex" # Plex if needed
|
||||
)
|
||||
|
||||
# Container running check — still applies — skips threshold checks when no servers active
|
||||
# Checked against the first entry in TRANSCODE_SERVERS automatically
|
||||
TRANSCODE_CHECK_EMBY=true
|
||||
|
||||
# Per-host Emby container names for database repair
|
||||
# HOST1 repairs its own personal Emby + the shared production Emby
|
||||
# HOST2 repairs its own personal Emby
|
||||
# detect_hosts() selects the correct container at runtime
|
||||
HOST1_EMBY_REPAIR_CONTAINER="Emby" # shared production Emby lives on HOST1
|
||||
HOST2_EMBY_REPAIR_CONTAINER="Emby-Jayred365" # HOST2's personal Emby instance
|
||||
|
||||
# Daily transcode statistics log — read by weekly_health_digest.sh
|
||||
# Tracks peak usage, flip count, session ratio, files cleaned per day
|
||||
@@ -1251,20 +1257,10 @@ ZFS_REPORT_IGNORE_POOLS=(
|
||||
CRITICAL_SYNC_UPDATES_REMOTE=true # pull container updates on remote via SSH
|
||||
|
||||
# ━━━ Emby ━━━
|
||||
# Emby URL and API key used by multiple scripts:
|
||||
# transcode_manager.sh, emby_session_report.sh, emby_database_repair.sh
|
||||
# Each server has its own Emby instance with its own API key.
|
||||
# detect_hosts() selects the correct URL and key at runtime.
|
||||
# API key found in Emby Dashboard → API Keys → + New Key
|
||||
|
||||
HOST1_EMBY_URL="http://localhost:8096"
|
||||
HOST1_EMBY_API_KEY="0c27448d93a7431f9ac63569f7655829"
|
||||
|
||||
HOST2_EMBY_URL="http://localhost:8096" # same port — different server, different key
|
||||
HOST2_EMBY_API_KEY="your-host2-emby-api-key"
|
||||
|
||||
# ━━━ Emby Session Report ━━━
|
||||
# No persistent writes — queries fresh each run.
|
||||
# Emby URL and API key pulled from HOST1/HOST2_EMBY_URL and HOST1/HOST2_EMBY_API_KEY
|
||||
# defined in Host Configuration at the top of this file.
|
||||
EMBY_REPORT_DAYS=7 # number of days to include in the report period
|
||||
EMBY_REPORT_TOP_N=10 # number of top content items to show in report
|
||||
|
||||
|
||||
@@ -22,10 +22,10 @@
|
||||
# authentication.db — API keys and sessions
|
||||
# activity.db — activity log
|
||||
#
|
||||
# HOST1 repairs the shared production Emby (HOST1_EMBY_REPAIR_CONTAINER).
|
||||
# HOST2 repairs its own personal Emby (HOST2_EMBY_REPAIR_CONTAINER).
|
||||
# HOST1 repairs its own Emby (HOST1_EMBY_CONTAINER).
|
||||
# HOST2 repairs its own Emby (HOST2_EMBY_CONTAINER).
|
||||
# detect_hosts() selects the correct container at runtime.
|
||||
# Config path is detected from Docker inspect — no hardcoded paths needed.
|
||||
# Container name defined in Host Configuration in Master.conf.
|
||||
# Supports --dry-run to show what would be checked without stopping Emby.
|
||||
# -----------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -55,9 +55,9 @@ acquire_lock
|
||||
detect_hosts
|
||||
|
||||
if [[ "$LOCAL_SERVER_NAME" == "$HOST1" ]]; then
|
||||
EMBY_CONTAINER="$HOST1_EMBY_REPAIR_CONTAINER"
|
||||
EMBY_CONTAINER="$HOST1_EMBY_CONTAINER"
|
||||
else
|
||||
EMBY_CONTAINER="$HOST2_EMBY_REPAIR_CONTAINER"
|
||||
EMBY_CONTAINER="$HOST2_EMBY_CONTAINER"
|
||||
fi
|
||||
|
||||
info "Emby container: $LOCAL_SERVER_NAME → $EMBY_CONTAINER"
|
||||
|
||||
Reference in New Issue
Block a user