diff --git a/change.php b/change.php index 8f550c06..ad56f6f0 100644 --- a/change.php +++ b/change.php @@ -12,9 +12,9 @@ $list = explode("/", htmlspecialchars(strtolower($_SERVER["REQUEST_URI"]))); if($list[1]==""||!isset($list[1])||count($list)<=1)$list="videos"; else $list=$list[1]; $list="lists/".$list.".json"; - +$array = array("nowPlaying" => array(), "songs" => array(), "conf" => array("startTime" => time(), "views" => 0, "skips" => array())); $f = @fopen($list,"x"); -if($f){ fwrite($f,"[[],[".time()."],[],[],[],[]]"); fclose($f); } +if($f){ fwrite($f,$array); fclose($f); } $file = file_get_contents($list); $data = json_decode($file, TRUE); $songs = $data["songs"];