Merge branch 'devel' of dev.sourcefabric.org:airtime into devel
This commit is contained in:
commit
70a51f1aca
|
@ -333,6 +333,7 @@ class ScheduleController extends Zend_Controller_Action
|
|||
public function getCurrentPlaylistAction()
|
||||
{
|
||||
$range = Application_Model_Schedule::GetPlayOrderRange();
|
||||
$show = Application_Model_Show::GetCurrentShow();
|
||||
|
||||
/* Convert all UTC times to localtime before sending back to user. */
|
||||
if (isset($range["previous"])){
|
||||
|
@ -371,6 +372,7 @@ class ScheduleController extends Zend_Controller_Action
|
|||
$this->view->switch_status = $switch_status;
|
||||
|
||||
$this->view->entries = $range;
|
||||
$this->view->show_name = $show[0]["name"];
|
||||
}
|
||||
|
||||
public function removeGroupAction()
|
||||
|
@ -850,7 +852,10 @@ class ScheduleController extends Zend_Controller_Action
|
|||
|
||||
try {
|
||||
$scheduler = new Application_Model_Scheduler();
|
||||
$scheduler->cancelShow($id);
|
||||
$scheduler->cancelShow($id);
|
||||
// send kick out source stream signal to pypo
|
||||
$data = array("sourcename"=>"live_dj");
|
||||
Application_Model_RabbitMq::SendMessageToPypo("disconnect_source", $data);
|
||||
}
|
||||
catch (Exception $e) {
|
||||
$this->view->error = $e->getMessage();
|
||||
|
|
|
@ -1314,7 +1314,7 @@ class Application_Model_Show {
|
|||
|
||||
$show = new Application_Model_Show($show_id);
|
||||
|
||||
while($utcStartDateTime->getTimestamp() <= $p_dateTime->getTimestamp()
|
||||
while($utcStartDateTime->getTimestamp() <= $p_populateUntilDateTime->getTimestamp()
|
||||
&& (is_null($utcLastShowDateTime) || $utcStartDateTime->getTimestamp() < $utcLastShowDateTime->getTimestamp())){
|
||||
|
||||
list($utcStartDateTime, $utcEndDateTime) = Application_Model_Show::createUTCStartEndDateTime($start, $duration, $timezone);
|
||||
|
@ -1687,8 +1687,8 @@ class Application_Model_Show {
|
|||
$showDay = CcShowDaysQuery::create()
|
||||
->filterByDbShowId($this->_showId)
|
||||
->findOne();
|
||||
|
||||
$showDay->setDbFirstShow($dt)
|
||||
|
||||
$showDay->setDbFirstShow($dt)->setDbStartTime($dt)
|
||||
->save();
|
||||
|
||||
Logging::log("setting show's first show.");
|
||||
|
|
|
@ -570,9 +570,14 @@ class Application_Model_ShowInstance {
|
|||
|
||||
if ($time != "00:00:00") {
|
||||
$time_arr = explode(".", $time);
|
||||
$time_arr[1] = "." . $time_arr[1];
|
||||
$milliseconds = number_format(round($time_arr[1], 2), 2);
|
||||
$time = $time_arr[0] . substr($milliseconds, 1);
|
||||
if (count($time_arr) > 1) {
|
||||
$time_arr[1] = "." . $time_arr[1];
|
||||
$milliseconds = number_format(round($time_arr[1], 2), 2);
|
||||
$time = $time_arr[0] . substr($milliseconds, 1);
|
||||
}
|
||||
else {
|
||||
$time = $time_arr[0] . ".00";
|
||||
}
|
||||
} else {
|
||||
$time = "00:00:00.00";
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
<dd><span contenteditable="true" class="spl_text_input spl_main_fade_in">00</span></dd>
|
||||
<dd class="edit-error"></dd>
|
||||
<dt>Fade out (s):</dt>
|
||||
<dd><span contenteditable="true" class="spl_text_input spl_main_fade_out">00/span></dd>
|
||||
<dd><span contenteditable="true" class="spl_text_input spl_main_fade_out">00</span></dd>
|
||||
<dd class="edit-error"></dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
@ -52,4 +52,4 @@
|
|||
|
||||
<?php else : ?>
|
||||
<div>No open playlist</div>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
|
|
|
@ -8,6 +8,8 @@ var nextSong = null;
|
|||
var currentShow = new Array();
|
||||
var nextShow = new Array();
|
||||
|
||||
var showName = null;
|
||||
|
||||
var currentElem;
|
||||
|
||||
var serverUpdateInterval = 5000;
|
||||
|
@ -148,7 +150,21 @@ function updatePlaybar(){
|
|||
else
|
||||
$('#current').text(currentSong.name+",");
|
||||
}else{
|
||||
$('#current').html("Current: <span style='color:red; font-weight:bold'>Nothing Scheduled</span>");
|
||||
if (master_dj_on_air) {
|
||||
if (showName) {
|
||||
$('#current').html("Current: <span style='color:red; font-weight:bold'>"+showName+" - Master Stream</span>");
|
||||
} else {
|
||||
$('#current').html("Current: <span style='color:red; font-weight:bold'>Master Stream</span>");
|
||||
}
|
||||
} else if (live_dj_on_air) {
|
||||
if (showName) {
|
||||
$('#current').html("Current: <span style='color:red; font-weight:bold'>"+showName+" - Live Stream</span>");
|
||||
} else {
|
||||
$('#current').html("Current: <span style='color:red; font-weight:bold'>Live Stream</span>");
|
||||
}
|
||||
} else {
|
||||
$('#current').html("Current: <span style='color:red; font-weight:bold'>Nothing Scheduled</span>");
|
||||
}
|
||||
}
|
||||
|
||||
if (nextSong !== null){
|
||||
|
@ -346,6 +362,7 @@ function getScheduleFromServer(){
|
|||
parseItems(data.entries);
|
||||
parseSourceStatus(data.source_status);
|
||||
parseSwitchStatus(data.switch_status);
|
||||
showName = data.show_name;
|
||||
}, error:function(jqXHR, textStatus, errorThrown){}});
|
||||
setTimeout(getScheduleFromServer, serverUpdateInterval);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue