aboutsummaryrefslogtreecommitdiff
path: root/model/Room.php
diff options
context:
space:
mode:
authordedeibel2017-12-10 18:21:34 +0100
committerdedeibel2017-12-10 18:27:34 +0100
commitb25046267febba28dec4479be91522f577f953b2 (patch)
treebb84b4782481e88e84070024ecef2c982a610f99 /model/Room.php
parenteed207f8dfd68117715518c83fc32d3ae9e1e094 (diff)
Removed dash and music translations from the api because its wrong
Diffstat (limited to '')
-rw-r--r--model/Room.php13
1 files 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;