summaryrefslogtreecommitdiff
path: root/bin/files.php
diff options
context:
space:
mode:
authorTheTroll <trolldev@gmail.com>2010-03-18 01:07:28 +0100
committerTheTroll <trolldev@gmail.com>2010-03-18 01:07:28 +0100
commitef0bc7bd8c304fe13b941d62ff07da33f5f49315 (patch)
tree5c77fe376d8195e4ce0aae033121a98cd3004733 /bin/files.php
parent459abaa2386fd1935abf8b763aee046222b13a01 (diff)
downloadistreamdev-ef0bc7bd8c304fe13b941d62ff07da33f5f49315.tar.gz
istreamdev-ef0bc7bd8c304fe13b941d62ff07da33f5f49315.tar.bz2
Support audio streaming
Temporary video/audio sources
Diffstat (limited to 'bin/files.php')
-rwxr-xr-xbin/files.php22
1 files changed, 7 insertions, 15 deletions
diff --git a/bin/files.php b/bin/files.php
index d87d332..30dbe49 100755
--- a/bin/files.php
+++ b/bin/files.php
@@ -80,15 +80,6 @@ function mediagentb($stream, $dest)
exec('cp ../logos/nologoMEDIA.png ' .$dest);
}
-function mediagetwidth($file)
-{
-
- $getid3 = new getID3;
- $fileinfo = $getid3->analyze($file);
-
- return $fileinfo['video']['resolution_x'];
-}
-
function filegettype($file)
{
global $videotypes, $audiotypes;
@@ -114,7 +105,7 @@ function filegettype($file)
return 'unknown';
}
-function mediagetmusicinfo($file ="")
+function mediagetmusicinfo($file)
{
// Get info
$getid3 = new getID3;
@@ -187,6 +178,8 @@ function filesgetlisting($dir)
// Alphabetical sorting
sort($medianame_array);
+ $number = 1;
+
foreach($medianame_array as $value)
{
$newentry = array();
@@ -199,18 +192,17 @@ function filesgetlisting($dir)
switch ($type)
{
case 'audio':
+ list($newentry['trackname'], $newentry['length']) = mediagetmusicinfo($dir ."/" .$value);
+ $newentry['number'] = $number;
+ $number++;
case 'video':
case 'rec':
case 'folder':
$newentry['type'] = $type;
+ $listing[] = $newentry;
break;
default:
- continue;
-
}
-
- // Add new entry
- $listing[] = $newentry;
}
return $listing;