Merge pull request 'release/dev' (#2) from release/dev into main
Reviewed-on: #2
This commit was merged in pull request #2.
This commit is contained in:
8
api/.gitignore
vendored
8
api/.gitignore
vendored
@@ -1,5 +1,5 @@
|
|||||||
/vendor
|
syntax: glob
|
||||||
/.idea
|
|
||||||
Homestead.json
|
|
||||||
Homestead.yaml
|
|
||||||
.env
|
.env
|
||||||
|
api/storage
|
||||||
|
*.orig
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ class PodcastController extends Controller
|
|||||||
{
|
{
|
||||||
public static $BASE_SQL = <<<QUERY
|
public static $BASE_SQL = <<<QUERY
|
||||||
SELECT `podcast`.`id`, `podcast`.`soundfilename`,
|
SELECT `podcast`.`id`, `podcast`.`soundfilename`,
|
||||||
`podcast_meta`.`creationdt` AS `created`, `podcast_meta`.`title`, `podcast_meta`.`content`, `podcast_meta`.`program`,
|
`podcast_meta`.`creationdt` AS `created`, `podcast_meta`.`title`, `podcast_meta`.`content`, `podcast_meta`.`program`, `podcast_meta`.`imagefile`, `podcast_meta`.`imagecaption`,
|
||||||
`programs`.`longname` AS `program_name`, `programs`.`description` AS `program_description`
|
`programs`.`longname` AS `program_name`, `programs`.`description` AS `program_description`
|
||||||
FROM `podcast`
|
FROM `podcast`
|
||||||
INNER JOIN `podcast_meta` ON `podcast`.`id` = `podcast_meta`.`podcast`
|
INNER JOIN `podcast_meta` ON `podcast`.`id` = `podcast_meta`.`podcast`
|
||||||
|
|||||||
21
api/app/Http/Controllers/TvController.php
Normal file
21
api/app/Http/Controllers/TvController.php
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
<?php
|
||||||
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
|
||||||
|
class TvController extends Controller
|
||||||
|
{
|
||||||
|
public function ticker() {
|
||||||
|
$programController = new ProgramController();
|
||||||
|
$program = $programController->comingup();
|
||||||
|
|
||||||
|
$newsController = new NewsController();
|
||||||
|
$news = $newsController->retrieveNewsItems(1, 3, null, []);
|
||||||
|
|
||||||
|
return view('tv_ticker', [
|
||||||
|
'onair' => $program->getData(),
|
||||||
|
'news' => $news
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
37
api/resources/views/tv_ticker.blade.php
Normal file
37
api/resources/views/tv_ticker.blade.php
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
NH Gooi 92.0 FM ***
|
||||||
|
|
||||||
|
@if($onair && $onair->schedule && count($onair->schedule))
|
||||||
|
<?
|
||||||
|
$current = $onair->schedule[0];
|
||||||
|
$ends = new \DateTimeImmutable($current->end->date, new \DateTimeZone($current->end->timezone));
|
||||||
|
?>
|
||||||
|
Met nu tot {{ $ends->format('H:i') }} uur:
|
||||||
|
{{ $current->program->name }}
|
||||||
|
@if($current->program->tagline
|
||||||
|
&& ($tagline = trim(html_entity_decode($current->program->tagline))))
|
||||||
|
– {{ $tagline }}
|
||||||
|
@endif
|
||||||
|
***
|
||||||
|
|
||||||
|
@if(count($onair->schedule) > 1)
|
||||||
|
<? $next = $onair->schedule[1]->program; ?>
|
||||||
|
Daarna: {{ $next->name }}
|
||||||
|
@if($current->program->tagline
|
||||||
|
&& ($tagline = trim(html_entity_decode($next->tagline))))
|
||||||
|
– {{ $tagline }}
|
||||||
|
@endif
|
||||||
|
***
|
||||||
|
@endif
|
||||||
|
@endif
|
||||||
|
|
||||||
|
@if(count($news))
|
||||||
|
Laatste nieuws van nhgooi.nl:
|
||||||
|
@foreach($news as $item)
|
||||||
|
{{ $item->title }}
|
||||||
|
@if($item->video)
|
||||||
|
- bekijk de video op nhgooi.nl
|
||||||
|
@endif
|
||||||
|
***
|
||||||
|
@endforeach
|
||||||
|
@endif
|
||||||
|
Meer nieuws op nhgooi.nl ***
|
||||||
@@ -63,6 +63,8 @@ $app->get('programma/details/{id:\d+}', 'ProgramController@details' );
|
|||||||
$app->get('programma/download/{year:20\d\d}/{month:\d\d?}/{day:\d\d?}/{hour:\d\d?}/{duration:\d\d?}', 'PodcastController@complete');
|
$app->get('programma/download/{year:20\d\d}/{month:\d\d?}/{day:\d\d?}/{hour:\d\d?}/{duration:\d\d?}', 'PodcastController@complete');
|
||||||
$app->get('programma/studiocam/onair', 'ProgramController@studiocam' );
|
$app->get('programma/studiocam/onair', 'ProgramController@studiocam' );
|
||||||
|
|
||||||
|
$app->get('/tv/ticker', 'TvController@ticker');
|
||||||
|
|
||||||
$app->get('kerkdienst', 'KerkdienstController@get');
|
$app->get('kerkdienst', 'KerkdienstController@get');
|
||||||
$app->get('kerkdienst/stream', 'KerkdienstController@podcast');
|
$app->get('kerkdienst/stream', 'KerkdienstController@podcast');
|
||||||
$app->get('kerkdienst/download', 'KerkdienstController@download');
|
$app->get('kerkdienst/download', 'KerkdienstController@download');
|
||||||
|
|||||||
Reference in New Issue
Block a user