diff options
-rwxr-xr-x | genplaylist.php | 39 | ||||
-rwxr-xr-x | includes/inc_audio.php | 7 | ||||
-rwxr-xr-x | indexmusic.php | 32 |
3 files changed, 6 insertions, 72 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"; diff --git a/includes/inc_audio.php b/includes/inc_audio.php index 414b885..2828ca4 100755 --- a/includes/inc_audio.php +++ b/includes/inc_audio.php @@ -68,15 +68,18 @@ if ($medianame_array[0]) if (mediagettype($mediapath .$subdir .$medianame_array[$cnt]) == 2) { print " <li>\r\n"; + + unset($track); for ($cnt2=$cnt; $cnt2<$count; $cnt2++) { - $track[$cnt2-$cnt] = $httppath."playlist/".$medianame2; + if (mediagettype($mediapath .$subdir .$medianame_array[$cnt2]) == 2) + $track[$cnt2-$cnt] = $httppath ."playlist/" .addslashes($medianame_array[$cnt2]); } $jsarray = php2js($track); - print " <a class=\"noeffect\" href=\"javascript:var myarray = new Array({$jsarray});addplayer('{$mediapath}{$subdir}','{$medianame2}',myarray);document.player.Play();\">\r\n"; + print " <a class=\"noeffect\" href=\"javascript:var myarray = new Array({$jsarray});addplayer('{$mediapath2}{$subdir2}','{$medianame2}',myarray);document.player.Play();\">\r\n"; print " <span class=\"number\">$idx</span><span class=\"stop\"></span><span class=\"name\">{$medianame_array[$cnt]}</span>\r\n"; print " </a>\r\n"; diff --git a/indexmusic.php b/indexmusic.php deleted file mode 100755 index 6fd01a8..0000000 --- a/indexmusic.php +++ /dev/null @@ -1,32 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml"> - -<head> -<meta content="yes" name="apple-mobile-web-app-capable" /> -<meta http-equiv="content-type" content="text/html; charset=UTF-8"> -<meta content="minimum-scale=1.0, width=device-width, maximum-scale=0.6667, user-scalable=no" name="viewport" /> -<link href="css/style.css" rel="stylesheet" type="text/css" /> -<script src="javascript/spinningwheel-min.js" type="text/javascript"></script> -<script src="javascript/ajax.js" type="text/javascript"></script> -<script src="javascript/functions.js" type="text/javascript"></script> -<title>iStreamdev</title> -<link href="images/startup.png" rel="apple-touch-startup-image" /> -<link rel="apple-touch-icon" href="images/istreamdev.png"/> -<link rel="stylesheet" href="css/spinningwheel.css" type="text/css" media="all" /> -</head> - - -<?php - include ('includes/inc_mp3.php'); -?> - -<div id="footer"> - - iStreamdev version: <? print $isdversion; ?> -</div> - -</body> - -</html> - - |