Merge branch 'master' of git.c3voc.de:streaming-website

This commit is contained in:
derchris 2021-12-27 09:24:46 +01:00
commit 41df99afe4
3 changed files with 47 additions and 27 deletions

View file

@ -149,6 +149,10 @@ $CONFIG['OVERVIEW'] = array(
), ),
); );
if ( date('H') < 10 ) {
krsort($CONFIG['OVERVIEW']['GROUPS']);
}
/** /**
* Globale Konfiguration der IRC-Links. * Globale Konfiguration der IRC-Links.
@ -235,9 +239,9 @@ $CONFIG['ROOMS'] = array(
* in $CONFIG['OVERVIEW'] oder im Feedback verwendet wird. * in $CONFIG['OVERVIEW'] oder im Feedback verwendet wird.
*/ */
'c3lounge' => array( 'c3lounge' => array(
'DISPLAY' => 'Lounge', 'DISPLAY' => 'rC3 Lounge',
'DISPLAY_SHORT' => 'Lounge', 'DISPLAY_SHORT' => 'Lounge',
'WIDE' => true, #'WIDE' => true,
'STREAM' => 'c3lounge', 'STREAM' => 'c3lounge',
'PREVIEW' => true, 'PREVIEW' => true,
@ -273,7 +277,7 @@ $CONFIG['ROOMS'] = array(
'abchillgleis' => array( 'abchillgleis' => array(
'DISPLAY' => 'Abchillgleis', 'DISPLAY' => 'Abchillgleis',
'DISPLAY_SHORT' => 'Abchillgleis', 'DISPLAY_SHORT' => 'Abchillgleis',
'WIDE' => false, #'WIDE' => false,
'STREAM' => 'abchillgleis', 'STREAM' => 'abchillgleis',
'PREVIEW' => true, 'PREVIEW' => true,
@ -672,8 +676,8 @@ $CONFIG['ROOMS'] = array(
), ),
'gehacktesfromhell' => array( 'gehacktesfromhell' => array(
'DISPLAY' => 'Gehacktes from Hell', 'DISPLAY' => 'Gehacktes from Hell / Bierscheune',
'DISPLAY_SHORT' => 'gehacktesfromhell', 'DISPLAY_SHORT' => 'Hell',
'STREAM' => 'gehacktes', 'STREAM' => 'gehacktes',
'PREVIEW' => true, 'PREVIEW' => true,
'TRANSLATION' => [ 'TRANSLATION' => [
@ -708,7 +712,7 @@ $CONFIG['ROOMS'] = array(
), ),
'xhain' => array( 'xhain' => array(
'DISPLAY' => 'xHain', 'DISPLAY' => 'xHain Lichtung',
'DISPLAY_SHORT' => 'xHain', 'DISPLAY_SHORT' => 'xHain',
'STREAM' => 'xhain', 'STREAM' => 'xhain',
'PREVIEW' => true, 'PREVIEW' => true,
@ -836,8 +840,8 @@ $CONFIG['SCHEDULE'] = array(
* Diese folgende Beispiel-Zeile Simuliert, dass das * Diese folgende Beispiel-Zeile Simuliert, dass das
* Konferenz-Datum 2014-12-29 auf den heutigen Tag 2015-02-24 verschoben ist. * Konferenz-Datum 2014-12-29 auf den heutigen Tag 2015-02-24 verschoben ist.
*/ */
//'SIMULATE_OFFSET' => strtotime(/* Conference-Date */ '2021-12-27') - strtotime(/* Today */ date("Y-m-d")), // 'SIMULATE_OFFSET' => strtotime(/* Conference-Date */ '2021-12-27') - strtotime(/* Today */ date("Y-m-d")),
'SIMULATE_OFFSET' => 0, //'SIMULATE_OFFSET' => 0,
); );
/* /*

View file

@ -99,14 +99,16 @@ class Stream
$display .= 'Radio'; $display .= 'Radio';
break; break;
case 'dash': case 'hls':
if($room->h264Only()) { // do not add suffix when we only provide HLS
$display .= 'HLS'; if($this->getRoom()->h264Only()) {
} else {
$display .= 'DASH';
}
break; break;
}
case 'dash':
if($this->getRoom()->h264Only()) {
$display .= 'DASH';
break;
}
default: default:
$display .= ucfirst($this->getSelection()); $display .= ucfirst($this->getSelection());
break; break;

View file

@ -11,9 +11,19 @@
<? endif ?> <? endif ?>
<div class="row room-group room-group-n<?=h($i++)?> room-group-<?=h(slugify($group))?>"> <div class="row room-group room-group-n<?=h($i++)?> room-group-<?=h(slugify($group))?>">
<? $count = count($rooms); $idx = 0 ?>
<? foreach($rooms as $room): ?>
<? <?
$count = count($rooms);
$idx = 0;
usort($rooms, function ($a, $b) {
global $upcomingTalksPerRoom;
return (
$upcomingTalksPerRoom[ $a->getSlug() ]['next']['start']
<=>
$upcomingTalksPerRoom[ $b->getSlug() ]['next']['start']
);
});
foreach($rooms as $room):
$is_wide = 0; $is_wide = 0;
/* when the count is odd and this is the last item - make it full width */ /* when the count is odd and this is the last item - make it full width */
if (($count % 2 == 1) && ($idx == $count - 1)) { if (($count % 2 == 1) && ($idx == $count - 1)) {
@ -77,18 +87,22 @@
<? endif ?> <? endif ?>
<? if($room->hasSchedule()): ?> <? if($room->hasSchedule()):
<? $upcoming = @$upcomingTalksPerRoom[ $room->getSlug() ] ?: [] ?> $upcoming = @$upcomingTalksPerRoom[ $room->getSlug() ] ?: [];
$current = @$upcoming['current'];
$next = @$upcoming['next']; ?>
<div class="program-schedule"> <div class="program-schedule">
<div class="talk current-talk" title="<?=h(@$upcoming['current']['title'] ?: 'none') ?>"> <? if($current['title']): ?>
<strong>Now (since <?=date('G:i', @$upcoming['current']['start']) ?>):</strong><br/> <div class="talk current-talk" title="<?=h(@$current['title'] ?: 'none') ?>">
<span class="t"><?=h(@$upcoming['current']['title'] ?: 'none') ?></span> <strong>Now (since <?=date('G:i', @$upcoming['start']) ?>):</strong><br/>
<span class="t"><?=h(@$upcoming['title'] ?: 'none') ?></span>
</div> </div>
<? endif; if($next['title']): ?>
<div class="talk next-talk" title="<?=h(@$upcoming['next']['title'] ?: 'none') ?>"> <div class="talk next-talk" title="<?=h(@$next['title'] ?: 'none') ?>">
<strong>Next Talk (<?=date('G:i', @$upcoming['next']['start']) ?>):</strong><br/> <strong>Next Talk (<?=date('G:i', @$next['start']) ?>):</strong><br/>
<span class="t"><?=h(@$upcoming['next']['title'] ?: 'none') ?></span> <span class="t"><?=h(@$next['title'] ?: 'none') ?></span>
</div> </div>
<? endif ?>
</div> </div>
<? endif ?> <? endif ?>
</div> </div>