From f9d9af88675e9b245716e97b762444adb5178072 Mon Sep 17 00:00:00 2001 From: TheTroll Date: Thu, 25 Feb 2010 14:57:43 +0100 Subject: Fixed playlist generation --- genplaylist.php | 39 +-------------------------------------- 1 file changed, 1 insertion(+), 38 deletions(-) (limited to 'genplaylist.php') 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 "error"; - 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 "error"; - 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 "ok\n"; - } - } - else - echo "error"; - } + echo "ok\n"; echo "\n"; -- cgit v1.2.3