From 967faa4dd1c94769995aec1cde6878490d03756c Mon Sep 17 00:00:00 2001 From: TheTroll Date: Tue, 23 Mar 2010 18:25:44 +0100 Subject: Added options to enable/disable vdr and media --- bin/jsonapi.php | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'bin/jsonapi.php') diff --git a/bin/jsonapi.php b/bin/jsonapi.php index bb83f52..fc39434 100755 --- a/bin/jsonapi.php +++ b/bin/jsonapi.php @@ -2,13 +2,24 @@ function getGlobals() { - global $vdrstreamdev, $vdrrecpath, $mediasource, $videosource, $audiosource; + global $vdrstreamdev, $vdrrecpath, $mediasource, $videosource, $audiosource, $vdrenable, $mediaenable; $ret = array(); - $ret['streamdev_server'] = $vdrstreamdev; + if ($vdrenable) + $ret['streamdev_server'] = $vdrstreamdev; + else + $ret['streamdev_server'] = ""; $ret['rec_path'] = $vdrrecpath; - $ret['video_path'] = $videosource; - $ret['audio_path'] = $audiosource; + if ($mediaenable) + { + $ret['video_path'] = $videosource; + $ret['audio_path'] = $audiosource; + } + else + { + $ret['video_path'] = ""; + $ret['audio_path'] = ""; + } return json_encode($ret); } -- cgit v1.2.3