diff options
author | TheTroll <trolldev@gmail.com> | 2010-02-25 14:57:43 +0100 |
---|---|---|
committer | TheTroll <trolldev@gmail.com> | 2010-02-25 14:57:43 +0100 |
commit | f9d9af88675e9b245716e97b762444adb5178072 (patch) | |
tree | f920ecb6839a35d4e63df74119b8ce32290c50ef /genplaylist.php | |
parent | eef4ca4b8dff922c1c675fd95d6ccccc6cc5c55c (diff) | |
download | istreamdev-f9d9af88675e9b245716e97b762444adb5178072.tar.gz istreamdev-f9d9af88675e9b245716e97b762444adb5178072.tar.bz2 |
Fixed playlist generation
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"; |