Merge branch 'devel' of dev.sourcefabric.org:airtime into devel
This commit is contained in:
commit
28f1d885f2
53 changed files with 625 additions and 294 deletions
|
@ -158,7 +158,7 @@ class ApiController extends Zend_Controller_Action
|
|||
$this->view->layout()->disableLayout();
|
||||
$this->_helper->viewRenderer->setNoRender(true);
|
||||
|
||||
$date = new DateHelper;
|
||||
$date = new Application_Model_DateHelper;
|
||||
$timeNow = $date->getTimestamp();
|
||||
$result = array("env"=>APPLICATION_ENV,
|
||||
"schedulerTime"=>gmdate("Y-m-d H:i:s"),
|
||||
|
@ -400,7 +400,7 @@ class ApiController extends Zend_Controller_Action
|
|||
$tags = array_merge($hosts, array($show_name));
|
||||
|
||||
try {
|
||||
$soundcloud = new ATSoundcloud();
|
||||
$soundcloud = new Application_Model_AtSoundcloud();
|
||||
$soundcloud_id = $soundcloud->uploadTrack($file->getFilePath(), $tmpTitle, $description, $tags, $show_start_time, $show_genre);
|
||||
$file->setSoundCloudFileId($soundcloud_id);
|
||||
break;
|
||||
|
@ -673,7 +673,6 @@ class ApiController extends Zend_Controller_Action
|
|||
"platform"=>Application_Model_Systemstatus::GetPlatformInfo(),
|
||||
"airtime_version"=>Application_Model_Preference::GetAirtimeVersion(),
|
||||
"services"=>array(
|
||||
"icecast2"=>Application_Model_Systemstatus::GetIcecastStatus(),
|
||||
"rabbitmq"=>Application_Model_Systemstatus::GetRabbitMqStatus(),
|
||||
"pypo"=>Application_Model_Systemstatus::GetPypoStatus(),
|
||||
"liquidsoap"=>Application_Model_Systemstatus::GetLiquidsoapStatus(),
|
||||
|
|
|
@ -164,7 +164,7 @@ class LibraryController extends Zend_Controller_Action
|
|||
else {
|
||||
$res = settype($res, "integer");
|
||||
$data = array("filepath" => $file->getFilePath(), "delete" => $res);
|
||||
RabbitMq::SendMessageToMediaMonitor("file_delete", $data);
|
||||
Application_Model_RabbitMq::SendMessageToMediaMonitor("file_delete", $data);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -214,7 +214,7 @@ class LibraryController extends Zend_Controller_Action
|
|||
|
||||
$data = $file->getMetadata();
|
||||
|
||||
RabbitMq::SendMessageToMediaMonitor("md_update", $data);
|
||||
Application_Model_RabbitMq::SendMessageToMediaMonitor("md_update", $data);
|
||||
|
||||
$this->_helper->redirector('index');
|
||||
}
|
||||
|
|
|
@ -188,7 +188,7 @@ class PreferenceController extends Zend_Controller_Action
|
|||
Application_Model_StreamSetting::setStreamSetting($values);
|
||||
$data = array();
|
||||
$data['setting'] = Application_Model_StreamSetting::getStreamSetting();
|
||||
RabbitMq::SendMessageToPypo("update_stream_setting", $data);
|
||||
Application_Model_RabbitMq::SendMessageToPypo("update_stream_setting", $data);
|
||||
$this->view->statusMsg = "<div class='success'>Stream Setting Updated.</div>";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -152,8 +152,8 @@ class ScheduleController extends Zend_Controller_Action
|
|||
|
||||
$params = '/format/json/id/#id#';
|
||||
|
||||
$showStartDateHelper = DateHelper::ConvertToLocalDateTime($show->getShowStart());
|
||||
$showEndDateHelper = DateHelper::ConvertToLocalDateTime($show->getShowEnd());
|
||||
$showStartDateHelper = Application_Model_DateHelper::ConvertToLocalDateTime($show->getShowStart());
|
||||
$showEndDateHelper = Application_Model_DateHelper::ConvertToLocalDateTime($show->getShowEnd());
|
||||
|
||||
if ($epochNow < $showStartDateHelper->getTimestamp()) {
|
||||
|
||||
|
@ -461,7 +461,7 @@ class ScheduleController extends Zend_Controller_Action
|
|||
$i = 1;
|
||||
foreach ($rebroadcastsRelative as $rebroadcast){
|
||||
$rebroadcastFormValues["add_show_rebroadcast_date_$i"] = $rebroadcast['day_offset'];
|
||||
$rebroadcastFormValues["add_show_rebroadcast_time_$i"] = DateHelper::removeSecondsFromTime($rebroadcast['start_time']);
|
||||
$rebroadcastFormValues["add_show_rebroadcast_time_$i"] = Application_Model_DateHelper::removeSecondsFromTime($rebroadcast['start_time']);
|
||||
$i++;
|
||||
}
|
||||
$formRebroadcast->populate($rebroadcastFormValues);
|
||||
|
@ -471,7 +471,7 @@ class ScheduleController extends Zend_Controller_Action
|
|||
$i = 1;
|
||||
foreach ($rebroadcastsAbsolute as $rebroadcast){
|
||||
$rebroadcastAbsoluteFormValues["add_show_rebroadcast_date_absolute_$i"] = $rebroadcast['start_date'];
|
||||
$rebroadcastAbsoluteFormValues["add_show_rebroadcast_time_absolute_$i"] = DateHelper::removeSecondsFromTime($rebroadcast['start_time']);
|
||||
$rebroadcastAbsoluteFormValues["add_show_rebroadcast_time_absolute_$i"] = Application_Model_DateHelper::removeSecondsFromTime($rebroadcast['start_time']);
|
||||
$i++;
|
||||
}
|
||||
$formAbsoluteRebroadcast->populate($rebroadcastAbsoluteFormValues);
|
||||
|
@ -700,7 +700,7 @@ class ScheduleController extends Zend_Controller_Action
|
|||
$show->clearShow();
|
||||
$show->deleteShow();
|
||||
// send 'cancel-current-show' command to pypo
|
||||
RabbitMq::SendMessageToPypo("cancel_current_show", array());
|
||||
Application_Model_RabbitMq::SendMessageToPypo("cancel_current_show", array());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -18,8 +18,7 @@ class SystemstatusController extends Zend_Controller_Action
|
|||
"liquidsoap"=>Application_Model_Systemstatus::GetLiquidsoapStatus(),
|
||||
"show-recorder"=>Application_Model_Systemstatus::GetShowRecorderStatus(),
|
||||
"media-monitor"=>Application_Model_Systemstatus::GetMediaMonitorStatus(),
|
||||
"rabbitmq-server"=>Application_Model_Systemstatus::GetRabbitMqStatus(),
|
||||
"icecast2"=>Application_Model_Systemstatus::GetIcecastStatus()
|
||||
"rabbitmq-server"=>Application_Model_Systemstatus::GetRabbitMqStatus()
|
||||
);
|
||||
|
||||
$partitions = Application_Model_Systemstatus::GetDiskInfo();
|
||||
|
@ -27,7 +26,6 @@ class SystemstatusController extends Zend_Controller_Action
|
|||
$this->view->status = new StdClass;
|
||||
$this->view->status->services = $services;
|
||||
$this->view->status->partitions = $partitions;
|
||||
|
||||
}
|
||||
|
||||
public function getLogFileAction()
|
||||
|
|
|
@ -4,10 +4,10 @@ class RabbitMqPlugin extends Zend_Controller_Plugin_Abstract
|
|||
{
|
||||
public function dispatchLoopShutdown()
|
||||
{
|
||||
if (RabbitMq::$doPush) {
|
||||
if (Application_Model_RabbitMq::$doPush) {
|
||||
$md = array('schedule' => Application_Model_Schedule::GetScheduledPlaylists());
|
||||
RabbitMq::SendMessageToPypo("update_schedule", $md);
|
||||
RabbitMq::SendMessageToShowRecorder("update_schedule");
|
||||
Application_Model_RabbitMq::SendMessageToPypo("update_schedule", $md);
|
||||
Application_Model_RabbitMq::SendMessageToShowRecorder("update_schedule");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue