CC-3484: Pypo: On bootup, it should grab station name and stream
label for liquidsoap - fixed - created new function set_bootstrap_variables()
This commit is contained in:
parent
e76cffd8b0
commit
d4142f8b8b
5 changed files with 21 additions and 20 deletions
|
@ -30,7 +30,7 @@ class ApiController extends Zend_Controller_Action
|
|||
->addActionContext('rabbitmq-do-push', 'json')
|
||||
->addActionContext('check-live-stream-auth', 'json')
|
||||
->addActionContext('update-source-status', 'json')
|
||||
->addActionContext('get-switch-status', 'json')
|
||||
->addActionContext('get-bootstrap-info', 'json')
|
||||
->initContext();
|
||||
}
|
||||
|
||||
|
@ -1000,13 +1000,15 @@ class ApiController extends Zend_Controller_Action
|
|||
Application_Model_RabbitMq::PushSchedule();
|
||||
}
|
||||
|
||||
public function getSwitchStatusAction(){
|
||||
public function getBootstrapInfoAction(){
|
||||
$live_dj = Application_Model_Preference::GetSourceSwitchStatus('live_dj');
|
||||
$master_dj = Application_Model_Preference::GetSourceSwitchStatus('master_dj');
|
||||
$scheduled_play = Application_Model_Preference::GetSourceSwitchStatus('scheduled_play');
|
||||
|
||||
$res = array("live_dj"=>$live_dj, "master_dj"=>$master_dj, "scheduled_play"=>$scheduled_play);
|
||||
$this->view->status = $res;
|
||||
$this->view->switch_status = $res;
|
||||
$this->view->station_name = Application_Model_Preference::GetStationName();
|
||||
$this->view->stream_label = Application_Model_Preference::GetStreamLabelFormat();
|
||||
}
|
||||
|
||||
/* This is used but Liquidsoap to check authentication of live streams*/
|
||||
|
|
|
@ -154,10 +154,6 @@ class Application_Model_StreamSetting {
|
|||
} else if ($key == "output_sound_device_type") {
|
||||
$sql = "UPDATE cc_stream_setting SET value='$d' WHERE keyname='$key'";
|
||||
$CC_DBC->query($sql);
|
||||
} else if ($key == "streamFormat"){
|
||||
// this goes into cc_pref table
|
||||
Logging::log("Insert stream label format $d");
|
||||
Application_Model_Preference::SetStreamLabelFormat($d);
|
||||
} else if (is_array($d)) {
|
||||
$temp = explode('_', $key);
|
||||
$prefix = $temp[0];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue