mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Added delete after skip
Same as the delete after play function
This commit is contained in:
@@ -139,7 +139,12 @@ else if(isset($_GET['skip'])){ //skip song request
|
|||||||
//$data["conf"]["skips"]=$skips;
|
//$data["conf"]["skips"]=$skips;
|
||||||
if($skips>=$viewers/2){
|
if($skips>=$viewers/2){
|
||||||
array_shift($data["songs"]);
|
array_shift($data["songs"]);
|
||||||
|
$q = $data["conf"];
|
||||||
|
$q = array_key_exists("delsongs", $q);
|
||||||
|
if(!$data["conf"]["delsongs"] || $q != 1)
|
||||||
|
{
|
||||||
$data["songs"][$np[0]["id"]] = array("id" => $np[0]["id"], "title" => $np[0]["title"], "votes" => $np[0]["votes"], "added" => time(), "guids" => array());
|
$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"]);
|
array_shift($data["nowPlaying"]);
|
||||||
$data["nowPlaying"][$firstSong[0]["id"]] = array("id" => $firstSong[0]["id"], "title" => $firstSong[0]["title"], "votes" => 0, "added" => $firstSong[0]["added"], "guids" => $firstSong[0]["guids"]);
|
$data["nowPlaying"][$firstSong[0]["id"]] = array("id" => $firstSong[0]["id"], "title" => $firstSong[0]["title"], "votes" => 0, "added" => $firstSong[0]["added"], "guids" => $firstSong[0]["guids"]);
|
||||||
//array_push($data["songs"], $add);
|
//array_push($data["songs"], $add);
|
||||||
|
|||||||
Reference in New Issue
Block a user