diff --git a/app/src/View/ProgrammeCard.php b/app/src/View/ProgrammeCard.php
new file mode 100644
index 0000000..c67d6c6
--- /dev/null
+++ b/app/src/View/ProgrammeCard.php
@@ -0,0 +1,55 @@
+format('H:i') . ' · ' . ($item['channel']['name'] ?? '')
+ );
+ }
+
+ private static function button(
+ string $id,
+ string $logoUrl,
+ string $title,
+ string $meta,
+ ?int $percent = null
+ ): string {
+ ob_start();
+ ?>
+
+ $items) {
$channel = $channels[$channelId] ?? null;
- if (!$channel) continue;
+
+ if (!$channel) {
+ continue;
+ }
foreach ($items as $p) {
$start = $p['start'];
- if (!$start instanceof DateTimeInterface) continue;
+
+ if (!$start instanceof DateTimeInterface) {
+ continue;
+ }
if ($start >= $now && $start <= $now->modify('+30 minutes')) {
$id = ProgrammeIndexBuilder::id($channelId, $start, $p['title'] ?? '', $p['stop'] ?? null);
@@ -29,9 +36,11 @@ foreach ($programmes as $channelId => $items) {
];
}
- if ($start->format('Y-m-d') === $now->format('Y-m-d')
+ if (
+ $start->format('Y-m-d') === $now->format('Y-m-d')
&& $start->format('H:i') >= '20:00'
- && $start->format('H:i') <= '23:00') {
+ && $start->format('H:i') <= '23:00'
+ ) {
$id = ProgrammeIndexBuilder::id($channelId, $start, $p['title'] ?? '', $p['stop'] ?? null);
ProgrammeIndexBuilder::add($programmeIndex, $id, $channelId, $channel, $p);
@@ -46,7 +55,12 @@ foreach ($programmes as $channelId => $items) {
}
foreach ($currentProgrammes as $item) {
- $id = ProgrammeIndexBuilder::id($item['channel_id'], $item['start'], $item['title'] ?? '', $item['stop'] ?? null);
+ $id = ProgrammeIndexBuilder::id(
+ $item['channel_id'],
+ $item['start'],
+ $item['title'] ?? '',
+ $item['stop'] ?? null
+ );
ProgrammeIndexBuilder::add($programmeIndex, $id, $item['channel_id'], [
'name' => $item['channel_name'],
@@ -58,7 +72,10 @@ foreach ($currentProgrammes as $item) {
usort($upcoming, fn($a, $b) => $a['programme']['start'] <=> $b['programme']['start']);
usort($primetime, fn($a, $b) => $a['programme']['start'] <=> $b['programme']['start']);
-$favoritesNow = array_values(array_filter($currentProgrammes, fn($item) => !empty($item['favorite'])));
+$favoritesNow = array_values(array_filter(
+ $currentProgrammes,
+ fn($item) => !empty($item['favorite'])
+));
?>
Dein Überblick für jetzt, gleich und heute Abend.TVGuide