summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/jsonapi.php19
-rwxr-xr-xconfig_default.php4
2 files changed, 18 insertions, 5 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);
}
diff --git a/config_default.php b/config_default.php
index 0bd3c9c..af87a2f 100755
--- a/config_default.php
+++ b/config_default.php
@@ -5,13 +5,15 @@
$httppath = '/istreamdev/'; // Absolute path to the index.php file. //Don't put http://yourdomain !!
// VDR configuration
+ $vdrenable=1; // Enable/disable VDR feature
$vdrchannels='/etc/vdr/channels.conf'; // VDR channel list
$svdrpport=2001; // SVDRP port
$svdrpip='127.0.0.1'; // SVDRP ip
- $vdrstreamdev='http://127.0.0.1:3000/TS/'; // VDR streamdev URL (set to "" to disable the VDR feature)
+ $vdrstreamdev='http://127.0.0.1:3000/TS/'; // VDR streamdev URL
$vdrrecpath='/video/'; //VDR recording directory
// Media configuration
+ $mediaenable=1; //Enable/disable media streaming feature
$videotypes='avi mkv ts mov mp4 wmv flv mpg mpeg mpeg2 mpv '; // Supported video extensions (must finish with a space)
$audiotypes='mp3 aac wav '; // Supported audio extensions
$videosource = '/mnt/media/movies/'; // Video files directory