aboutsummaryrefslogtreecommitdiff
path: root/view
diff options
context:
space:
mode:
Diffstat (limited to 'view')
-rw-r--r--view/streams-json-v1.php12
1 files changed, 10 insertions, 2 deletions
diff --git a/view/streams-json-v1.php b/view/streams-json-v1.php
index 0988269..0f73be9 100644
--- a/view/streams-json-v1.php
+++ b/view/streams-json-v1.php
@@ -13,6 +13,7 @@ $overview = new Overview();
$struct = array();
foreach($overview->getGroups() as $group => $rooms)
{
+ $roomstruct = array();
foreach($rooms as $room)
{
$streams = array();
@@ -68,7 +69,8 @@ foreach($overview->getGroups() as $group => $rooms)
break;
}
- $streams[$key] = array(
+ $streams[] = array(
+ 'slug' => $key,
'display' => $stream->getDisplay(),
'type' => $stream->getPlayerType(),
'isTranslated' => $stream->isTranslated(),
@@ -77,11 +79,17 @@ foreach($overview->getGroups() as $group => $rooms)
);
}
- $struct[$group][$room->getSlug()] = array(
+ $roomstruct[] = array(
+ 'slug' => $room->getSlug(),
'display' => $room->getDisplay(),
'streams' => $streams,
);
}
+
+ $struct[] = array(
+ 'group' => $group,
+ 'rooms' => $roomstruct,
+ );
}
echo json_encode($struct, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);