Merge pull request #734 from mikeopensauce/726apionairfix
Bugfix for #726. Fixes onAirLightAction returning 500 error
This commit is contained in:
commit
e13fc6b3d9
1 changed files with 74 additions and 73 deletions
|
@ -178,6 +178,7 @@ class ApiController extends Zend_Controller_Action
|
||||||
//Used by the SaaS monitoring
|
//Used by the SaaS monitoring
|
||||||
public function onAirLightAction()
|
public function onAirLightAction()
|
||||||
{
|
{
|
||||||
|
$request = $this->getRequest();
|
||||||
$this->view->layout()->disableLayout();
|
$this->view->layout()->disableLayout();
|
||||||
$this->_helper->viewRenderer->setNoRender(true);
|
$this->_helper->viewRenderer->setNoRender(true);
|
||||||
|
|
||||||
|
@ -188,9 +189,9 @@ class ApiController extends Zend_Controller_Action
|
||||||
|
|
||||||
$range = Application_Model_Schedule::GetPlayOrderRange();
|
$range = Application_Model_Schedule::GetPlayOrderRange();
|
||||||
|
|
||||||
$isItemCurrentlyScheduled = !is_null($range["current"]) && count($range["currentShow"]) > 0 ? true : false;
|
$isItemCurrentlyScheduled = !is_null($range["tracks"]["current"]) && count($range["tracks"]["current"]) > 0 ? true : false;
|
||||||
|
|
||||||
$isCurrentItemPlaying = $range["current"]["media_item_played"] ? true : false;
|
$isCurrentItemPlaying = $range["tracks"]["current"]["media_item_played"] ? true : false;
|
||||||
|
|
||||||
if ($isItemCurrentlyScheduled ||
|
if ($isItemCurrentlyScheduled ||
|
||||||
Application_Model_Preference::GetSourceSwitchStatus("live_dj") == "on" ||
|
Application_Model_Preference::GetSourceSwitchStatus("live_dj") == "on" ||
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue