transcode manager now handles multiple media servers

This commit is contained in:
2026-04-20 18:17:13 -04:00
parent e83473ab8e
commit 1a16ca02a9
5 changed files with 255 additions and 69 deletions
+15 -5
View File
@@ -22,7 +22,10 @@
# authentication.db — API keys and sessions
# activity.db — activity log
#
# All configuration in Master.conf — uses TRANSCODE_EMBY_CONTAINER and EMBY_URL.
# HOST1 repairs the shared production Emby (HOST1_EMBY_REPAIR_CONTAINER).
# HOST2 repairs its own personal Emby (HOST2_EMBY_REPAIR_CONTAINER).
# detect_hosts() selects the correct container at runtime.
# Config path is detected from Docker inspect — no hardcoded paths needed.
# Supports --dry-run to show what would be checked without stopping Emby.
# -----------------------------------------------------------------------------------------------
@@ -33,10 +36,6 @@ source "$SCRIPT_DIR/../common.sh"
parse_args "$@"
# Emby config path — inside the container it's /config, map to host path
# Detected from Docker inspect at runtime
EMBY_CONTAINER="$TRANSCODE_EMBY_CONTAINER"
# -----------------------------------------------------------------------------------------------
# ━━━ $ICON_GEAR Setup ━━━
# -----------------------------------------------------------------------------------------------
@@ -52,6 +51,17 @@ success "Running as root"
acquire_lock
# Select correct Emby container based on which server is running this script
detect_hosts
if [[ "$LOCAL_SERVER_NAME" == "$HOST1" ]]; then
EMBY_CONTAINER="$HOST1_EMBY_REPAIR_CONTAINER"
else
EMBY_CONTAINER="$HOST2_EMBY_REPAIR_CONTAINER"
fi
info "Emby container: $LOCAL_SERVER_NAME$EMBY_CONTAINER"
if ! command -v sqlite3 >/dev/null 2>&1; then
error "sqlite3 not found — install sqlite package"
exit 1