summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/files.php33
-rwxr-xr-xconfig_default.php20
2 files changed, 31 insertions, 22 deletions
diff --git a/bin/files.php b/bin/files.php
index 7afe9e1..34db5bf 100755
--- a/bin/files.php
+++ b/bin/files.php
@@ -178,17 +178,38 @@ function filesgetlisting($dir)
// Alphabetical sorting
sort($medianame_array);
- $number = 1;
-
+ // List folders
foreach($medianame_array as $value)
{
- $newentry = array();
+ $type = filegettype($dir ."/" .$value);
+
+ if ($type != 'folder')
+ continue;
+ $newentry = array();
$newentry['name'] = $value;
- $newentry['path'] = $dir ."/" .$value;
+ $newentry['path'] = $dir ."/" .$value .'/';
+ $newentry['type'] = 'folder';
+
+ $listing[] = $newentry;
+ }
+
+ $number = 1;
+
+ // List files
+ foreach($medianame_array as $value)
+ {
$type = filegettype($dir ."/" .$value);
+ if ($type == 'folder')
+ continue;
+
+ $newentry = array();
+ $newentry['name'] = $value;
+ $newentry['path'] = $dir ."/" .$value;
+ $newentry['type'] = $type;
+
switch ($type)
{
case 'audio':
@@ -197,10 +218,6 @@ function filesgetlisting($dir)
$number++;
case 'video':
case 'rec':
- case 'folder':
- $newentry['type'] = $type;
- if ($type == 'folder')
- $newentry['path'] = $newentry['path'] .'/';
$listing[] = $newentry;
break;
default:
diff --git a/config_default.php b/config_default.php
index fab59dc..758ccc9 100755
--- a/config_default.php
+++ b/config_default.php
@@ -5,33 +5,25 @@
$httppath = '/istreamdev/'; // Absolute path to the index.php file. //Don't put http://yourdomain !!
// VDR configuration
-
- $vdrenabled=1; // enable/disable VDR features
- $vdrchannels='/etc/vdr/channels.conf'; // VDR channel list
+ $vdrenabled=1; // enable/disable VDR features
+ $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
- $vdrrecpath='/video/'; //VDR recording directory
+ $vdrrecpath='/video/'; //VDR recording directory
// Media configuration
$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
-
- // 1:vid 2:aud Source name Source path
- $mediasource=array();
- $mediasources[]=array ( 1, 'Video', '/mnt/media/movies/');
- $mediasources[]=array ( 2, 'Audio', '/mnt/media/music/');
-
- // TEMPORARY
- $videosource = '/mnt/media/movies/';
- $audiosource = '/mnt/media/music/';
+ $videosource = '/mnt/media/movies/'; // Video files directory
+ $audiosource = '/mnt/media/music/'; // Audio files directory
// Encoding (The name cannot be changed)
// Name Video Audio Audio channels Resolution
$quality=array ( 'edge' => '128k 64k 1 240x160',
'3g' => '350k 64k 1 408x272',
'wifi' => '512k 128k 2 480x320');
- $maxencodingprocesses=10; // Max simultaneous encoding processes
+ $maxencodingprocesses=10; // Max simultaneous encoding processes
// Misc
$ffmpegpath = '/usr/bin/ffmpeg'; //path to ffmpeg binary