diff options
Diffstat (limited to 'genplaylist.php')
-rwxr-xr-x | genplaylist.php | 39 |
1 files changed, 1 insertions, 38 deletions
diff --git a/genplaylist.php b/genplaylist.php index 9fa6016..e19cc7a 100755 --- a/genplaylist.php +++ b/genplaylist.php @@ -15,44 +15,7 @@ exec('rm playlist/*'); exec('ln -s ' .addcslashes(quotemeta($path), " &'") .'* playlist'); - $dir_handle = @opendir($path); - if (!$dir_handle) - echo "<m3u>error</m3u>"; - else - { - while ($medianame = readdir($dir_handle)) - if (mediagettype($path .$medianame) == 2) - $medianame_array[] = $medianame; - - if ($medianame_array[0]) - { - // Alphabetical sorting - sort($medianame_array); - - $plfile = fopen("playlist/playlist.m3u", 'w'); - if (!$plfile) - echo "<m3u>error</m3u>"; - else - { - $count = count($medianame_array); - $found = 0; - for ($cnt=0; $cnt < $count; $cnt++) - { - if ($medianame_array[$cnt] == $name) - $found=1; - - if ($found) - fwrite($plfile,$httppath . "playlist/" .$medianame_array[$cnt] ."\n"); - } - - fclose($plfile); - - echo "<m3u>ok</m3u>\n"; - } - } - else - echo "<m3u>error</m3u>"; - } + echo "<m3u>ok</m3u>\n"; echo "</status>\n"; |