Bug fix on air.txt
This commit is contained in:
@@ -281,15 +281,16 @@ QUERY;
|
||||
|
||||
$activeStudioQuery = app('db')->select("SELECT `studio` FROM `programs_schedule_webcam` WHERE `active` = 1");
|
||||
if(!count($activeStudioQuery) || !($activeStudio = $activeStudioQuery[0]->studio)) {
|
||||
$activeStudio = 'nonstop';
|
||||
}
|
||||
|
||||
$current = $this->getTrack($activeStudio);
|
||||
$next = $this->getTrack($activeStudio, /* next: */ true);
|
||||
$current->ends($next->start);
|
||||
if($current->isLayout() /* || $current->secondsRemaining() < 0 */) {
|
||||
if(!$next->isLayout()) {
|
||||
$current = $next;
|
||||
$activeStudio = null;
|
||||
$current = null;
|
||||
} else {
|
||||
$current = $this->getTrack($activeStudio);
|
||||
$next = $this->getTrack($activeStudio, /* next: */ true);
|
||||
$current->ends($next->start);
|
||||
if($current->isLayout() /* || $current->secondsRemaining() < 0 */) {
|
||||
if(!$next->isLayout()) {
|
||||
$current = $next;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -314,7 +315,7 @@ QUERY;
|
||||
|
||||
$activeStudioQuery = app('db')->select("SELECT `studio` FROM `programs_schedule_webcam` WHERE `active` = 1");
|
||||
if(!count($activeStudioQuery) || !($activeStudio = $activeStudioQuery[0]->studio)) {
|
||||
$activeStudio = 'nonstop';
|
||||
$activeStudio = $program->nonstop ? 'nonstop' : null;
|
||||
}
|
||||
|
||||
$text = [];
|
||||
@@ -332,7 +333,7 @@ QUERY;
|
||||
}
|
||||
}
|
||||
|
||||
if(!$request->get('program_only', false) && !($current->isLayout())) {
|
||||
if($current && !$request->get('program_only', false) && !($current->isLayout())) {
|
||||
if($current->title) $text[] = $current->title;
|
||||
if($current->artist) $text[] = $currenet->artist;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user