From 1c756d4357f3be6ff8dd97f7a74e2c04f99726a6 Mon Sep 17 00:00:00 2001 From: TheTroll Date: Sat, 27 Mar 2010 13:14:23 +0100 Subject: Prepared for nice rec name --- bin/files.php | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/bin/files.php b/bin/files.php index 123644e..6060fa9 100755 --- a/bin/files.php +++ b/bin/files.php @@ -206,18 +206,23 @@ function filesgetlisting($dir) list($newentry['trackname'], $newentry['length']) = mediagetmusicinfo($dir ."/" .$value); $newentry['number'] = $number; $number++; + $filelisting[] = $newentry; + break; case 'video': + $filelisting[] = $newentry; + break; case 'folder': + $newentry['path'] = $newentry['path'] .'/'; + // Skip emtpy dirs + if (glob(quotemeta($newentry['path']) .'*')) + $folderlisting[] = $newentry; + break; case 'rec': - if ($type == 'folder') - { - $newentry['path'] = $newentry['path'] .'/'; - - if (glob(quotemeta($newentry['path']) .'*')) - $folderlisting[] = $newentry; - } - else - $filelisting[] = $newentry; + $date = preg_replace('/-/', '/', substr($value, 0, 10)); + $time = preg_replace('/\./', 'h', substr($value, 11, 5)); + $recnice = $date .' at ' .$time; + //$newentry['name'] = $recnice; + $folderlisting[] = $newentry; break; default: } -- cgit v1.2.3