From ec52c7f277322c62487335cb0d4ac3d6fe507080 Mon Sep 17 00:00:00 2001 From: KasperRT Date: Mon, 13 Oct 2014 12:12:30 +0200 Subject: [PATCH] Updating from FTP --- php/change.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/php/change.php b/php/change.php index e5a2db32..0f2ffb16 100755 --- a/php/change.php +++ b/php/change.php @@ -32,11 +32,11 @@ if(isset($_REQUEST['thisUrl'])){ $firstToAdd = $firstSong[0]["id"]; if($np[0]["id"] == $string) { - if($action=="save"){ //next song + if($action=="save" || $action == "empty"){ //next song $save = true; //array_shift($data["songs"]); //array_shift($data["nowPlaying"]); - if(!is_null($np[0]["id"])){ + if(!is_null($np[0]["id"]) && !is_null($firstToAdd)){ array_shift($data["songs"]); $data["songs"][$np[0]["id"]] = array("id" => $np[0]["id"], "title" => $np[0]["title"], "votes" => $np[0]["votes"], "added" => time(), "guids" => array()); array_shift($data["nowPlaying"]);