diff options
author | TheTroll <trolldev@gmail.com> | 2010-03-23 18:25:44 +0100 |
---|---|---|
committer | TheTroll <trolldev@gmail.com> | 2010-03-23 18:25:44 +0100 |
commit | 967faa4dd1c94769995aec1cde6878490d03756c (patch) | |
tree | d663326e0252e140a040dd3a298c3bf3ac595944 /bin | |
parent | b03192bd25734f3b707d62fd41efa6345b0565e5 (diff) | |
download | istreamdev-967faa4dd1c94769995aec1cde6878490d03756c.tar.gz istreamdev-967faa4dd1c94769995aec1cde6878490d03756c.tar.bz2 |
Added options to enable/disable vdr and media
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/jsonapi.php | 19 |
1 files changed, 15 insertions, 4 deletions
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); } |