diff options
author | TheTroll <trolldev@gmail.com> | 2010-03-27 13:14:23 +0100 |
---|---|---|
committer | TheTroll <trolldev@gmail.com> | 2010-03-27 13:14:23 +0100 |
commit | 1c756d4357f3be6ff8dd97f7a74e2c04f99726a6 (patch) | |
tree | d3a7d149c7d7c330bfca55381d765a0b97107481 /bin | |
parent | 1237d5c0aacc7082d8fb7eca1c52f4c0edb0ddd0 (diff) | |
download | istreamdev-1c756d4357f3be6ff8dd97f7a74e2c04f99726a6.tar.gz istreamdev-1c756d4357f3be6ff8dd97f7a74e2c04f99726a6.tar.bz2 |
Prepared for nice rec name
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/files.php | 23 |
1 files 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: } |