On air
This commit is contained in:
@@ -184,7 +184,7 @@ QUERY;
|
|||||||
{
|
{
|
||||||
$start = new \DateTimeImmutable(urldecode($from));
|
$start = new \DateTimeImmutable(urldecode($from));
|
||||||
$end = new \DateTimeImmutable(urldecode($to));
|
$end = new \DateTimeImmutable(urldecode($to));
|
||||||
$this->createSchedule($start, $end, true);
|
print '<pre>' . json_encode($this->createSchedule($start, $end, true)) . '</pre>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -230,6 +230,16 @@ QUERY;
|
|||||||
return response()->json($program);
|
return response()->json($program);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Programmas nu en straks (24 uur vooruit)
|
||||||
|
*/
|
||||||
|
public function onair() {
|
||||||
|
$start = new \DateTimeImmutable('now');
|
||||||
|
$einde = new \DateTimeImmutable('now + 1 second');
|
||||||
|
$schema = $this->createSchedule($start, $einde);
|
||||||
|
return response()->json(['current' => ['program' => true, 'name' => $schema['schedule'][0]['program']->name]]);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Programmas nu en straks (24 uur vooruit)
|
* Programmas nu en straks (24 uur vooruit)
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ $app->get('podcast/programma/{id:\d+}', 'PodcastController@program' );
|
|||||||
$app->get('podcast/download/{id:\d+}/{title}', 'PodcastController@download' );
|
$app->get('podcast/download/{id:\d+}/{title}', 'PodcastController@download' );
|
||||||
$app->get('podcast/stream/{id:\d+}/{title}', 'PodcastController@stream' );
|
$app->get('podcast/stream/{id:\d+}/{title}', 'PodcastController@stream' );
|
||||||
|
|
||||||
|
$app->get('programma/schema/onair', 'ProgramController@onair' );
|
||||||
$app->get('programma/schema/nustraks', 'ProgramController@comingup' );
|
$app->get('programma/schema/nustraks', 'ProgramController@comingup' );
|
||||||
$app->get('programma/schema/week[/{shiftWeeks:-?\d+}]', 'ProgramController@schedule' );
|
$app->get('programma/schema/week[/{shiftWeeks:-?\d+}]', 'ProgramController@schedule' );
|
||||||
$app->get('programma/details/{id:\d+}', 'ProgramController@details' );
|
$app->get('programma/details/{id:\d+}', 'ProgramController@details' );
|
||||||
|
|||||||
Reference in New Issue
Block a user