From a65f00810fe12fd3f1a825fed8ddd5a8e59d5e09 Mon Sep 17 00:00:00 2001 From: jb-alvarado Date: Thu, 16 Aug 2018 10:58:39 +0200 Subject: [PATCH] get time shift from config file --- resources/list_op.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/resources/list_op.php b/resources/list_op.php index 69895fee..649abb83 100644 --- a/resources/list_op.php +++ b/resources/list_op.php @@ -28,6 +28,21 @@ if(!empty($_GET['clips_root'])) { echo $root; } +// get time_shift +if (!empty($_GET['time_shift'])) { + $get_ini = get_config(); + $get_shift = "/^time_shift.*\$/m"; + preg_match_all($get_shift, $get_ini, $shift_arr); + $line_shift = implode("\n", $shift_arr[0]); + $time_shift = explode("= ", $line_shift)[1]; + + if(empty($time_shift)) { + echo 0; + } else { + echo $time_shift; + } +} + /* ----------------------------------------------------------------------------- xml playlist operations ------------------------------------------------------------------------------*/