diff options
author | TheTroll <trolldev@gmail.com> | 2010-02-26 14:47:14 +0100 |
---|---|---|
committer | TheTroll <trolldev@gmail.com> | 2010-02-26 14:47:14 +0100 |
commit | 13faaed4ec54b1611dcc1dd7aa796fe3649fdc6a (patch) | |
tree | bdd40801e6c2bb737044246bf16d4dce92e60ba6 /includes/inc_audio.php | |
parent | 9cd6bbb758f3be5c2390a77770cc54b05dcf0b83 (diff) | |
download | istreamdev-13faaed4ec54b1611dcc1dd7aa796fe3649fdc6a.tar.gz istreamdev-13faaed4ec54b1611dcc1dd7aa796fe3649fdc6a.tar.bz2 |
Display ID3 tag if available for music
Diffstat (limited to 'includes/inc_audio.php')
-rwxr-xr-x | includes/inc_audio.php | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/includes/inc_audio.php b/includes/inc_audio.php index f0e0046..2960aa5 100755 --- a/includes/inc_audio.php +++ b/includes/inc_audio.php @@ -51,9 +51,10 @@ if ($medianame_array[0]) sort($medianame_array); $count = count($medianame_array); + + // Directories for ($cnt=0; $cnt < $count; $cnt++) { - // Dirs if (mediagettype($mediapath .$subdir .$medianame_array[$cnt]) == 3) { $medianame2=addslashes($medianame_array[$cnt]); @@ -71,6 +72,8 @@ if ($medianame_array[0]) } } + + // Music files $idx = 1; for ($cnt=0; $cnt < $count; $cnt++) { @@ -95,19 +98,19 @@ if ($medianame_array[0]) print " <a class=\"noeffect\" href=\"javascript:var myarray = new Array({$jsarray});addplayer('{$mediapath2}{$subdir2}','{$medianame2}',myarray);document.player.Play();\">\r\n"; - print " <span class=\"number\">$idx</span><span class=\"stop\"></span><span class=\"name\">{$medianame_array[$cnt]}</span>\r\n"; + // Get song info + list($name, $duration) = mediagetmusicinfo($mediapath .$subdir .$medianame_array[$cnt]); + + print " <span class=\"number\">$idx</span><span class=\"stop\"></span><span class=\"name\">{$name}</span><span class=\"time\">{$duration}</span>\r\n"; print " </a>\r\n"; print " </li>\r\n"; $idx++; } } - - print("</div>"); - } -else - print "</div>\r\n"; + +print "</div>\r\n"; $upsubdir = dirname($subdir); |