Changes before go-live
This commit is contained in:
@@ -78,11 +78,13 @@ class RadioController extends Controller
|
||||
public function terugluisteren(Request $request)
|
||||
{
|
||||
$programs = [];
|
||||
$now = new \DateTimeImmutable('2 minutes ago');
|
||||
$apiResult = $this->API('programma/schema/recent');
|
||||
foreach($apiResult->schedule as $item) {
|
||||
if(!$item->program->nonstop && !$item->program->rerun) {
|
||||
$item->start = self::JsonToDateTime($item->start);
|
||||
$item->end = self::JsonToDateTime($item->end);
|
||||
$item->current = $item->end >= $now;
|
||||
$item->program = new \Model\Program($item->program);
|
||||
$programs[] = $item;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user