summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheTroll <trolldev@gmail.com>2010-02-24 23:25:13 +0100
committerTheTroll <trolldev@gmail.com>2010-02-24 23:25:13 +0100
commitc47d063ff2076ee38daded85fedacd02055b63a2 (patch)
tree789cd80dc38a18b5502d671fe8a16c0e430066bd
parent8b5cae4e61249e671cca45cd1d37ee56d8dc543c (diff)
downloadistreamdev-c47d063ff2076ee38daded85fedacd02055b63a2.tar.gz
istreamdev-c47d063ff2076ee38daded85fedacd02055b63a2.tar.bz2
Fixed aac/wav files
-rwxr-xr-xconfig_default.php2
-rwxr-xr-xincludes/inc_files.php12
-rwxr-xr-xincludes/include.php2
3 files changed, 9 insertions, 7 deletions
diff --git a/config_default.php b/config_default.php
index 6491d02..9ca31e7 100755
--- a/config_default.php
+++ b/config_default.php
@@ -15,7 +15,7 @@
// Media configuration
$mediainfopath='/usr/bin/mediainfo';
- $videotypes='avi mkv ts mov mp4 wmv flv mpg mpeg mpeg2 mpv'; //video files extensions
+ $videotypes='avi mkv ts mov mp4 wmv flv mpg mpeg mpeg2 mpv '; // Supported video extensions (must finish with a space)
// Source name Source path
$mediasources=array ( 'Video' => '/mnt/media/movies',
'Audio' => '/mnt/media/music');
diff --git a/includes/inc_files.php b/includes/inc_files.php
index 0a48aeb..266059d 100755
--- a/includes/inc_files.php
+++ b/includes/inc_files.php
@@ -1,6 +1,6 @@
<?php
-$audiotypes='mp3 aac wav';
+$audiotypes='mp3 aac wav ';
function mediagetinfostream($stream = "")
{
@@ -48,15 +48,15 @@ function mediagetinfostream($stream = "")
function mediagettype($file)
{
global $videotypes, $audiotypes;
-
+
// Get file extension
$fileext = end(explode(".", $file));
if (is_dir($file))
return 3;
- if ( preg_match("/" .$fileext ." /", $videotypes) || preg_match("/" .$fileext ." $/", $videotypes) )
+ if (preg_match("/" .$fileext ." /", $videotypes))
return 1;
- else if ( preg_match("/" .$fileext ." /", $audiotypes) || preg_match("/" .$fileext ." $/", $audiotypes) )
+ else if (preg_match("/" .$fileext ." /", $audiotypes))
return 2;
else
return 0;
@@ -67,8 +67,12 @@ function mediadirhasaudio($dir)
global $audiotypes;
$audioextarray = explode(' ', $audiotypes);
+
foreach ($audioextarray as $num => $audioext)
+ {
if (glob($dir .'*.' .$audioext))
return 1;
+ }
+
return 0;
}
diff --git a/includes/include.php b/includes/include.php
index a409f45..f8819dd 100755
--- a/includes/include.php
+++ b/includes/include.php
@@ -10,8 +10,6 @@ include ('includes/inc_vdr.php');
include ('includes/inc_files.php');
include ('includes/inc_streaminfo.php');
-$audiotypes='mp3 aac';
-
function selectpage()
{
$action = $_REQUEST['action'];