summaryrefslogtreecommitdiff
path: root/genplaylist.php
diff options
context:
space:
mode:
authorTheTroll <trolldev@gmail.com>2010-02-25 14:57:43 +0100
committerTheTroll <trolldev@gmail.com>2010-02-25 14:57:43 +0100
commitf9d9af88675e9b245716e97b762444adb5178072 (patch)
treef920ecb6839a35d4e63df74119b8ce32290c50ef /genplaylist.php
parenteef4ca4b8dff922c1c675fd95d6ccccc6cc5c55c (diff)
downloadistreamdev-f9d9af88675e9b245716e97b762444adb5178072.tar.gz
istreamdev-f9d9af88675e9b245716e97b762444adb5178072.tar.bz2
Fixed playlist generation
Diffstat (limited to 'genplaylist.php')
-rwxr-xr-xgenplaylist.php39
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";