From b25046267febba28dec4479be91522f577f953b2 Mon Sep 17 00:00:00 2001 From: dedeibel Date: Sun, 10 Dec 2017 18:21:34 +0100 Subject: Removed dash and music translations from the api because its wrong --- model/Room.php | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/model/Room.php b/model/Room.php index 27a8d97..dd63038 100644 --- a/model/Room.php +++ b/model/Room.php @@ -233,6 +233,11 @@ class Room return $selections; } + public function isSelectionTranslated($selection) { + # dash is special, has langs included + return $selection !== 'dash' && $selection !== 'music'; + } + public function getTabNames() { $tabs = array(); @@ -314,9 +319,11 @@ class Room foreach ($selections as $selection) { $streams[] = $this->createStreamObject($selection, 'native'); - foreach ($this->getTranslations() as $translation) { - $streams[] = $this->createStreamObject($selection, $translation['endpoint'], $translation['label']); - } + if ($this->isSelectionTranslated($selection)) { + foreach ($this->getTranslations() as $translation) { + $streams[] = $this->createStreamObject($selection, $translation['endpoint'], $translation['label']); + } + } } return $streams; -- cgit v1.2.3