diff options
-rwxr-xr-x | bin/jsonapi.php | 15 | ||||
-rwxr-xr-x | config_default.php | 9 |
2 files changed, 13 insertions, 11 deletions
diff --git a/bin/jsonapi.php b/bin/jsonapi.php index e825fec..a567808 100755 --- a/bin/jsonapi.php +++ b/bin/jsonapi.php @@ -2,24 +2,23 @@ function getGlobals() { - global $vdrstreamdev, $vdrrecpath, $mediasource, $videosource, $audiosource, $vdrenabled, $mediaenabled; + global $vdrstreamdev, $vdrrecpath, $mediasource, $videosource, $audiosource; + global $enablevdr, $enablemediavideo, $enablemediaaudio; $ret = array(); - if ($vdrenabled) + if ($enablevdr) $ret['streamdev_server'] = $vdrstreamdev; else $ret['streamdev_server'] = ""; $ret['rec_path'] = $vdrrecpath; - if ($mediaenabled) - { + if ($enablemediavideo) $ret['video_path'] = $videosource; - $ret['audio_path'] = $audiosource; - } else - { $ret['video_path'] = ""; + if ($enablemediaaudio) + $ret['audio_path'] = $audiosource; + else $ret['audio_path'] = ""; - } return json_encode($ret); } diff --git a/config_default.php b/config_default.php index b421482..11aa4a1 100755 --- a/config_default.php +++ b/config_default.php @@ -1,11 +1,15 @@ <?php + // Enable/disable features + $enablevdr=1; // VDR feature + $enablemediavideo=1; // Video streaming + $enablemediaaudio=1; // Audio streaming + // Http configuration $user = 'istreamdev'; // Login $pass = 'iguest'; // Password - $httppath = '/istreamdev/'; // Absolute path to the index.php file. //Don't put http://yourdomain !! + $httppath = '/istreamdev/'; // Absolute path to the index.php file. Don't put http://yourdomain !! // VDR configuration - $vdrenabled=1; // Enable/disable VDR feature $vdrchannels='/etc/vdr/channels.conf'; // VDR channel list $svdrpport=2001; // SVDRP port $svdrpip='127.0.0.1'; // SVDRP ip @@ -13,7 +17,6 @@ $vdrrecpath='/video/'; //VDR recording directory // Media configuration - $mediaenabled=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 |