Radio-dodsorfas/web/playlist.php

26 lines
388 B
PHP

<?
include 'common.php';
header('Content-type: audio/x-mpegurl');
$files = scanDir::scan('/playlists/normal', false, true);
echo "#EXTM3U\n";
foreach($files as $file) {
$filename = $file;
$file = file($file);
$file = array_slice($file, 1);
echo "\n#$filename\n";
foreach($file as $line) {
echo "$line";
if (substr($line, -1) !== "\n")
echo "\n";
}
}
?>