release/dev #2

Merged
mischa.spelt merged 2 commits from release/dev into main 2024-05-03 17:25:31 +02:00
5 changed files with 65 additions and 5 deletions

8
api/.gitignore vendored
View File

@@ -1,5 +1,5 @@
/vendor syntax: glob
/.idea
Homestead.json
Homestead.yaml
.env .env
api/storage
*.orig

View File

@@ -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`

View 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
]);
}
}

View 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))))
&ndash; {{ $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))))
&ndash; {{ $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 ***

View File

@@ -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');