aboutsummaryrefslogtreecommitdiff
path: root/configs/conferences/chaosradio
diff options
context:
space:
mode:
Diffstat (limited to 'configs/conferences/chaosradio')
-rw-r--r--configs/conferences/chaosradio/config.php17
1 files changed, 13 insertions, 4 deletions
diff --git a/configs/conferences/chaosradio/config.php b/configs/conferences/chaosradio/config.php
index 5657957..6b971d9 100644
--- a/configs/conferences/chaosradio/config.php
+++ b/configs/conferences/chaosradio/config.php
@@ -1,9 +1,18 @@
<?php
-$EPISODE = 219;
-$DATE = strtotime("2016-01-28 22:00");
-$TITLE = "Chaosradio $EPISODE - Backstage im Netz";
-$IM_CCCB = false; // im CCCB=false oder im Fritz-Studio=true
+$upcoming = new Upcoming();
+$upcoming_events = $upcoming->getNextEvents();
+$upcoming_crs = array_values(array_filter($upcoming_events, function($event) {
+ return preg_match('/^cr[0-9]+$/i', $event['short_name']);
+}));
+$upcoming_cr = $upcoming_crs[0];
+
+preg_match('/^cr([0-9]+)$/i', $upcoming_cr['short_name'], $m);
+
+$EPISODE = intval($m[1]);
+$DATE = strtotime($upcoming_cr['start_date'].' 22:00');
+$TITLE = "Chaosradio $EPISODE";
+$IM_CCCB = ($upcoming_cr['location'] == 'CCCB');
$STREAM = $IM_CCCB ? 's5' : 'q2';