mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Fixed merge issues
This commit is contained in:
11
php/timedifference.php
Executable file → Normal file
11
php/timedifference.php
Executable file → Normal file
@@ -2,11 +2,12 @@
|
||||
$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";
|
||||
$data = json_decode(file_get_contents($list));
|
||||
$diff = (time() - $data[1][0]);
|
||||
|
||||
$returnArray = array($diff, $data[0][0], time(), $data[1][0], $data[3][0], $data[4][0]);
|
||||
$list="..lists/".$list.".json";
|
||||
$data = json_decode(file_get_contents($list), true);
|
||||
$songs = $data["nowPlaying"];
|
||||
$id = array_values($songs);
|
||||
$diff = (time() - $data["conf"]["startTime"]);
|
||||
$returnArray = array($diff, $id[0]["id"], time(), $data["conf"]["startTime"], $id[0]["title"], $data["conf"]["views"]);
|
||||
$returnArray = json_encode($returnArray);
|
||||
|
||||
echo $returnArray;
|
||||
|
||||
Reference in New Issue
Block a user