This commit is contained in:
devdatt 2025-12-16 12:06:59 +05:30
parent 641aedab48
commit a21550ebaf
1 changed files with 9 additions and 2 deletions

View File

@ -117,6 +117,10 @@ function update_service($which_service)
$hdmi_delay_video = $data['hdmi']['video_delay']; $hdmi_delay_video = $data['hdmi']['video_delay'];
$hdmi_delay_audio = $data['hdmi']['audio_delay']; $hdmi_delay_audio = $data['hdmi']['audio_delay'];
if ($srt_pass1 === "")
$srt_pass1 = generateRandomString(16);
if ($srt_pass2 === "")
$srt_pass2 = generateRandomString(16);
switch ($use_common_backend) { switch ($use_common_backend) {
case "copy_input": case "copy_input":
switch ($input_source) { switch ($input_source) {
@ -742,8 +746,6 @@ function update_network()
$raw = file_get_contents($jsonFile); $raw = file_get_contents($jsonFile);
$data = json_decode($raw, true); $data = json_decode($raw, true);
} }
} }
} }
@ -811,6 +813,11 @@ function update_service_backend($service)
$srt_pass1 = $data['srt']['stream_id_1']; $srt_pass1 = $data['srt']['stream_id_1'];
$srt_pass2 = $data['srt']['stream_id_2']; $srt_pass2 = $data['srt']['stream_id_2'];
if ($srt_pass1 === "")
$srt_pass1 = generateRandomString(16);
if ($srt_pass2 === "")
$srt_pass2 = generateRandomString(16);
$jsonFile = __DIR__ . '/output.json'; $jsonFile = __DIR__ . '/output.json';
$defaults = [ $defaults = [