fix: transcode monitor reads STATE_DIR from conf instead of hardcoded /tmp

vv_transcode_sessions() was hardcoded to /tmp/transcode_state.db but master.conf
sets TRANSCODE_STATE_FILE=$STATE_DIR/transcode_state.db which resolves to
/boot/config/plugins/varaverk/State_Files/transcode_state.db. Page always showed
"ramdisk_setup.sh not yet run" despite state file being present and populated.
This commit is contained in:
Gmer4Lfe
2026-06-05 19:29:31 -04:00
parent 437c525fbd
commit 415c260175
+3 -1
View File
@@ -726,7 +726,9 @@ function vv_parse_bash_array(string $raw, string $varName): array {
}
function vv_transcode_sessions(): array {
$stateFile = '/tmp/transcode_state.db';
$v = vv_conf_vars();
$stateDir = rtrim($v['STATE_DIR'] ?? '/boot/config/plugins/varaverk/State_Files', '/');
$stateFile = $v['TRANSCODE_STATE_FILE'] ?? "$stateDir/transcode_state.db";
if (!file_exists($stateFile)) return ['available' => false];
$raw = [];