aboutsummaryrefslogtreecommitdiff
path: root/model
diff options
context:
space:
mode:
Diffstat (limited to 'model')
-rw-r--r--model/Room.php9
-rw-r--r--model/Stream.php4
2 files changed, 9 insertions, 4 deletions
diff --git a/model/Room.php b/model/Room.php
index 56dab4c..27a8d97 100644
--- a/model/Room.php
+++ b/model/Room.php
@@ -337,9 +337,12 @@ class Room
throw new NotFoundException('Selection '.$selection.' in Room '.$this->getSlug());
$translation_label = null;
- if (substr($language, 0, strlen('native')) !== 'native') {
- if (!$this->hasTranslation()) {
- throw new NotFoundException('Translated Streams of Room '.$this->getSlug());
+ if ($language !== 'native' && $language !== 'stereo') {
+ if (! $this->hasTranslation()) {
+ throw new NotFoundException('Translated Streams of Room '. $this->getSlug());
+ }
+ if (! $this->isValidLanguage($language)) {
+ throw new NotFoundException('Selected translation');
}
$translation_label = $this->findTranslationLabel($language);
diff --git a/model/Stream.php b/model/Stream.php
index a4dcf72..28cb0f8 100644
--- a/model/Stream.php
+++ b/model/Stream.php
@@ -32,7 +32,9 @@ class Stream
public function isTranslated()
{
- return !empty($this->getLanguage()) && $this->getLanguage() !== 'native';
+ return !empty($this->getLanguage()) &&
+ $this->getLanguage() !== 'native' &&
+ $this->getLanguage() !== 'stereo';
}
public function getVideoSize()