summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorTheTroll <trolldev@gmail.com>2010-03-23 18:25:44 +0100
committerTheTroll <trolldev@gmail.com>2010-03-23 18:25:44 +0100
commit967faa4dd1c94769995aec1cde6878490d03756c (patch)
treed663326e0252e140a040dd3a298c3bf3ac595944 /bin
parentb03192bd25734f3b707d62fd41efa6345b0565e5 (diff)
downloadistreamdev-967faa4dd1c94769995aec1cde6878490d03756c.tar.gz
istreamdev-967faa4dd1c94769995aec1cde6878490d03756c.tar.bz2
Added options to enable/disable vdr and media
Diffstat (limited to 'bin')
-rwxr-xr-xbin/jsonapi.php19
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);
}