mirror of
https://github.com/voc/streaming-website
synced 2024-11-10 06:34:17 +00:00
misc fixes
This commit is contained in:
parent
05c773f8b8
commit
36a6ee344f
5 changed files with 24 additions and 8 deletions
11
config.php
11
config.php
|
@ -38,6 +38,12 @@ else
|
|||
$GLOBALS['CONFIG']['BASEURL'] = '//streaming.media.ccc.de/';
|
||||
}
|
||||
|
||||
/**
|
||||
* Wenn die Konfiguration einer Konferenz/Mandant nicht im Dateisystem gefunden wird:
|
||||
* Soll die Streamingwebseite versuchen diese bei data.c3voc.de per API abzufragen?
|
||||
*/
|
||||
$GLOBALS['CONFIG']['DYNAMIC_LOOKUP'] = false;
|
||||
|
||||
|
||||
/**
|
||||
* Konfiguration für den Datei-Download Cronjob
|
||||
|
@ -103,7 +109,10 @@ $GLOBALS['CONFIG']['FEEDBACK'] = array(
|
|||
*/
|
||||
|
||||
$GLOBALS['CONFIG']['ROOM_DEFAULTS'] = array(
|
||||
'WIDE' => true,
|
||||
/**
|
||||
* Breite Teaser in der Übersichtsseite
|
||||
*/
|
||||
'WIDE' => false,
|
||||
|
||||
/**
|
||||
* Stream-Vorschaubildchen auf der Übersichtsseite anzeigen
|
||||
|
|
|
@ -205,9 +205,9 @@ try {
|
|||
'conference_assets' => forceslash($mandator),
|
||||
|
||||
'conference' => $conference,
|
||||
'feedback' => $conference->getFeedback(),
|
||||
'schedule' => $conference->getSchedule(),
|
||||
'subtitles' => $conference->getSubtitles(),
|
||||
'feedback' => $conference ? $conference->getFeedback() : false,
|
||||
'schedule' => $conference ? $conference->getSchedule() : false,
|
||||
'subtitles' => $conference ? $conference->getSubtitles() : false,
|
||||
));
|
||||
|
||||
// ALWAYS AVAILABLE ROUTES
|
||||
|
|
|
@ -15,7 +15,7 @@ class ConferenceJson extends Conference
|
|||
$this->html = @$c->streamingConfig->html ?: [];
|
||||
|
||||
$this->rooms = [];
|
||||
$rooms = is_array(@$c->rooms) ? $c->rooms : @$c->rooms->nodes;
|
||||
$rooms = (is_array(@$c->rooms) ? $c->rooms : @$c->rooms->nodes) ?: [];
|
||||
foreach($rooms as $r) {
|
||||
if (!$r) {
|
||||
continue;
|
||||
|
|
|
@ -132,6 +132,11 @@ class Conferences
|
|||
return new Conference($config, $mandator);
|
||||
}
|
||||
|
||||
// config option for dynamic lookup feature defined below
|
||||
if (!@$GLOBALS['CONFIG']['DYNAMIC_LOOKUP']) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// otherwise try to find conference in c3data postgres
|
||||
$query = 'query StreamingConfig($acronym: String!) {
|
||||
conference(acronym: $acronym) {
|
||||
|
|
|
@ -53,15 +53,17 @@ function formatRooms($conference) {
|
|||
unset($config['guid']);
|
||||
unset($config['name']);
|
||||
unset($config['slug']);
|
||||
foreach ($config['chat'] as $k => $v) {
|
||||
unset($config[$k]);
|
||||
if (isset($config['chat'])) {
|
||||
foreach ($config['chat'] as $k => $v) {
|
||||
unset($config[$k]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$struct[] = array(
|
||||
'guid' => $room->getId(),
|
||||
'slug' => $room->getSlug(),
|
||||
'name' => $room->get('name') ?: $room->getScheduleName(),
|
||||
'name' => /*$room->get('name') ?: */ $room->getScheduleName(),
|
||||
'stream' => $room->getStream(),
|
||||
'streamingConfig' => $config ? lowerCaseKeys($config) : null,
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue