program_only in onair.txt

This commit is contained in:
2021-01-02 20:20:03 +01:00
parent 60cd0ea091
commit 25ec7db2ce

View File

@@ -296,7 +296,7 @@ QUERY;
}
}
public function onair_text() {
public function onair_text(Request $request) {
$start = new \DateTimeImmutable('now');
$einde = new \DateTimeImmutable('now + 1 second');
$schema = $this->createSchedule($start, $einde);
@@ -312,7 +312,9 @@ QUERY;
}
}
return $program->name . " - " . $current->title . " - " . $current->artist;
return $request->get('program_only', false)
? $program->name
: $program->name . " - " . $current->title . " - " . $current->artist;
} else {
return $program->name;
}