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,11 +20,15 @@ $np = array_values($np);
|
|||||||
$firstSong = array_values($songs);
|
$firstSong = array_values($songs);
|
||||||
$save = false; //declares the save variable, see further down for why
|
$save = false; //declares the save variable, see further down for why
|
||||||
|
|
||||||
|
try{
|
||||||
if(!in_array($guid, $data["conf"]["views"])){ //add viewer in viewers if not already in there
|
if(!in_array($guid, $data["conf"]["views"])){ //add viewer in viewers if not already in there
|
||||||
array_push($data["conf"]["views"], $guid);
|
array_push($data["conf"]["views"], $guid);
|
||||||
file_put_contents($list, json_encode($data));
|
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
|
//If test for either saving when the song is done, or an error has occured
|
||||||
if(isset($_REQUEST['thisUrl'])){
|
if(isset($_REQUEST['thisUrl'])){
|
||||||
|
|||||||
Reference in New Issue
Block a user