From dcbba6e1b0d00216b046b7b2a833e98b6890b06e Mon Sep 17 00:00:00 2001 From: Andreas Hubel Date: Thu, 24 Oct 2019 09:57:01 +0200 Subject: API: set isCurrentlyStreaming flag only when there is something other than a daychange event --- view/streams-json-v2.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/view/streams-json-v2.php b/view/streams-json-v2.php index 7f070dd..dacd2a1 100644 --- a/view/streams-json-v2.php +++ b/view/streams-json-v2.php @@ -11,12 +11,13 @@ foreach (Conferences::getActiveConferences() as $conference) $isCurrentlyStreaming = false; + // iterate through all rooms and only activate flag if there is something other than a daychange event foreach($conference->getRooms() as $room) { $currentTalk = $room->getCurrentTalk($now); if ($currentTalk) { - $isCurrentlyStreaming = true; - if (isset($currentTalk['special']) && $currentTalk['special'] == 'daychange') { + // if current event is a daychange ignore room, but only if the next talk does not start in 30 minutes + if ( !(isset($currentTalk['special']) && $currentTalk['special'] == 'daychange' && $currentTalk['end'] - $basetime > 30*60 )) { $isCurrentlyStreaming = true; break; } -- cgit v1.2.3