mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Fixed old lists bugging viewers
This commit is contained in:
@@ -20,10 +20,14 @@ $np = array_values($np);
|
||||
$firstSong = array_values($songs);
|
||||
$save = false; //declares the save variable, see further down for why
|
||||
|
||||
|
||||
if(!in_array($guid, $data["conf"]["views"])){ //add viewer in viewers if not already in there
|
||||
try{
|
||||
if(!in_array($guid, $data["conf"]["views"])){ //add viewer in viewers if not already in there
|
||||
array_push($data["conf"]["views"], $guid);
|
||||
file_put_contents($list, json_encode($data));
|
||||
}
|
||||
}catch(Exception $e){
|
||||
$data["conf"]["views"]=array($guid);
|
||||
file_put_contents($list, json_encode($data));
|
||||
}
|
||||
|
||||
//If test for either saving when the song is done, or an error has occured
|
||||
|
||||
Reference in New Issue
Block a user