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:
@@ -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 = [];
|
||||
|
||||
Reference in New Issue
Block a user