'', 'primary' => '', 'role' => '']; $vvMasterRaw = vv_read_conf_raw('master.conf'); if ($vvMasterRaw !== '' && $detectedHostname !== '') { preg_match_all('/^\s*(HOST\d+)\s*=\s*"([^"]*)"/m', $vvMasterRaw, $vvHm, PREG_SET_ORDER); $vvSlots = []; foreach ($vvHm as $m) { $val = trim($m[2]); if ($val !== '') $vvSlots[strtolower($m[1])] = $val; } foreach ($vvSlots as $slot => $name) { if (strcasecmp($name, $detectedHostname) === 0) { $vvDetected['slot'] = $slot; $vvDetected['role'] = ($slot === 'host1') ? 'primary' : 'partner'; break; } } // The primary is whatever HOST1 says, and it is only useful to a host that is not HOST1. if ($vvDetected['role'] === 'partner') $vvDetected['primary'] = $vvSlots['host1'] ?? ''; } ?>
HOST1_EMBY_API_KEY — Emby Dashboard → API Keys → + New KeyHOST1_JELLYFIN_API_KEY — Jellyfin Dashboard → Administration → API Keys (if using Jellyfin)HOST1_DISCORD_WEBHOOK — for notifications (optional)HOST1_DAILY_SYNC_SHARES — media paths to rsync nightly