Merge branch '2.3.x' into devel
This commit is contained in:
commit
cc69418215
29 changed files with 218 additions and 169 deletions
|
@ -229,7 +229,7 @@ class Application_Common_DateHelper
|
|||
public static function calculateLengthInSeconds($p_time){
|
||||
|
||||
if (2 !== substr_count($p_time, ":")){
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (1 === substr_count($p_time, ".")){
|
||||
|
@ -241,12 +241,8 @@ class Application_Common_DateHelper
|
|||
|
||||
list($hours, $minutes, $seconds) = explode(":", $hhmmss);
|
||||
|
||||
// keep ms in 3 digits
|
||||
$ms = substr($ms, 0, 3);
|
||||
|
||||
$totalSeconds = $hours*3600 + $minutes*60 + $seconds + $ms/1000;
|
||||
|
||||
return $totalSeconds;
|
||||
$totalSeconds = ($hours*3600 + $minutes*60 + $seconds).".$ms";
|
||||
return round($totalSeconds, 3);
|
||||
}
|
||||
|
||||
public static function ConvertToUtcDateTime($p_dateString, $timezone=null){
|
||||
|
|
|
@ -45,6 +45,7 @@ class ApiController extends Zend_Controller_Action
|
|||
->addActionContext('push-stream-stats' , 'json')
|
||||
->addActionContext('update-stream-setting-table' , 'json')
|
||||
->addActionContext('update-replay-gain-value' , 'json')
|
||||
->addActionContext('update-cue-values-by-silan' , 'json')
|
||||
->initContext();
|
||||
}
|
||||
|
||||
|
@ -948,6 +949,10 @@ class ApiController extends Zend_Controller_Action
|
|||
|
||||
public function updateReplayGainValueAction()
|
||||
{
|
||||
// disable the view and the layout
|
||||
$this->view->layout()->disableLayout();
|
||||
$this->_helper->viewRenderer->setNoRender(true);
|
||||
|
||||
$request = $this->getRequest();
|
||||
$data = json_decode($request->getParam('data'));
|
||||
|
||||
|
@ -964,13 +969,13 @@ class ApiController extends Zend_Controller_Action
|
|||
|
||||
public function updateCueValuesBySilanAction()
|
||||
{
|
||||
// disable layout
|
||||
// disable the view and the layout
|
||||
$this->view->layout()->disableLayout();
|
||||
$this->_helper->viewRenderer->setNoRender(true);
|
||||
|
||||
|
||||
$request = $this->getRequest();
|
||||
$data = json_decode($request->getParam('data'));
|
||||
Logging::info($data);
|
||||
|
||||
foreach ($data as $pair) {
|
||||
list($id, $info) = $pair;
|
||||
// TODO : move this code into model -- RG
|
||||
|
@ -982,6 +987,8 @@ class ApiController extends Zend_Controller_Action
|
|||
$file->setDbSilanCheck(true);
|
||||
$file->save();
|
||||
}
|
||||
|
||||
echo json_encode(array());
|
||||
}
|
||||
|
||||
public function notifyWebstreamDataAction()
|
||||
|
|
|
@ -22,6 +22,11 @@ class Application_Model_RabbitMq
|
|||
$CC_CONFIG["rabbitmq"]["user"],
|
||||
$CC_CONFIG["rabbitmq"]["password"],
|
||||
$CC_CONFIG["rabbitmq"]["vhost"]);
|
||||
|
||||
if (!isset($conn)) {
|
||||
throw new Exception("Cannot connect to RabbitMQ server");
|
||||
}
|
||||
|
||||
$channel = $conn->channel();
|
||||
$channel->access_request($CC_CONFIG["rabbitmq"]["vhost"], false, false,
|
||||
true, true);
|
||||
|
|
|
@ -368,7 +368,12 @@ SQL;
|
|||
|
||||
if (file_exists($filepath) && $type == "stor") {
|
||||
$data = array("filepath" => $filepath, "delete" => 1);
|
||||
Application_Model_RabbitMq::SendMessageToMediaMonitor("file_delete", $data);
|
||||
try {
|
||||
Application_Model_RabbitMq::SendMessageToMediaMonitor("file_delete", $data);
|
||||
} catch (Exception $e) {
|
||||
Logging::error($e->getMessage());
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue