Merge branch 'devel' of dev.sourcefabric.org:airtime into devel
This commit is contained in:
commit
608fff090c
|
@ -783,6 +783,8 @@ class ScheduleController extends Zend_Controller_Action
|
||||||
$data['add_show_instance_id']);
|
$data['add_show_instance_id']);
|
||||||
|
|
||||||
if ($success) {
|
if ($success) {
|
||||||
|
$scheduler = new Application_Model_Scheduler();
|
||||||
|
$scheduler->removeGaps($data['add_show_instance_id']);
|
||||||
$this->view->addNewShow = true;
|
$this->view->addNewShow = true;
|
||||||
$this->view->newForm = $this->view->render('schedule/add-show-form.phtml');
|
$this->view->newForm = $this->view->render('schedule/add-show-form.phtml');
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -696,6 +696,7 @@ SQL;
|
||||||
'start' => $start,
|
'start' => $start,
|
||||||
'end' => $end,
|
'end' => $end,
|
||||||
'show_name' => $item["show_name"],
|
'show_name' => $item["show_name"],
|
||||||
|
'row_id' => $item["id"],
|
||||||
'independent_event' => true
|
'independent_event' => true
|
||||||
);
|
);
|
||||||
self::appendScheduleItem($data, $start, $schedule_item);
|
self::appendScheduleItem($data, $start, $schedule_item);
|
||||||
|
|
|
@ -331,7 +331,7 @@ class Application_Model_Scheduler
|
||||||
* This function squeezes all items of a show together so that
|
* This function squeezes all items of a show together so that
|
||||||
* there are no gaps between them.
|
* there are no gaps between them.
|
||||||
*/
|
*/
|
||||||
private function removeGaps($showInstance, $exclude=null)
|
public function removeGaps($showInstance, $exclude=null)
|
||||||
{
|
{
|
||||||
Logging::info("removing gaps from show instance #".$showInstance);
|
Logging::info("removing gaps from show instance #".$showInstance);
|
||||||
|
|
||||||
|
|
|
@ -187,12 +187,12 @@ SQL;
|
||||||
if ($diff != 0) {
|
if ($diff != 0) {
|
||||||
$sql = <<<SQL
|
$sql = <<<SQL
|
||||||
UPDATE cc_schedule
|
UPDATE cc_schedule
|
||||||
SET starts = starts + INTERVAL :diff1 SECOND,
|
SET starts = starts + :diff1::INTERVAL SECOND,
|
||||||
ends = ends + INTERVAL :diff2 SECOND
|
ends = ends + :diff2::INTERVAL SECOND
|
||||||
WHERE instance_id = :instanceId
|
WHERE instance_id = :instanceId
|
||||||
SQL;
|
SQL;
|
||||||
Application_Common_Database::prepareAndExecute($sql,
|
Application_Common_Database::prepareAndExecute($sql,
|
||||||
array(
|
array(
|
||||||
':diff1' => $diff,
|
':diff1' => $diff,
|
||||||
':diff2' => $diff,
|
':diff2' => $diff,
|
||||||
':instanceId' => $instance_id ), 'execute');
|
':instanceId' => $instance_id ), 'execute');
|
||||||
|
@ -345,7 +345,7 @@ SQL;
|
||||||
//$sql = "SELECT timestamp '{$ends}' + interval '{$deltaDay} days' + interval '{$hours}:{$mins}'";
|
//$sql = "SELECT timestamp '{$ends}' + interval '{$deltaDay} days' + interval '{$hours}:{$mins}'";
|
||||||
$sql = "SELECT timestamp :ends + interval :deltaDays + interval :deltaTime";
|
$sql = "SELECT timestamp :ends + interval :deltaDays + interval :deltaTime";
|
||||||
|
|
||||||
$now_ends = Application_Common_Database::prepareAndExecute($sql,
|
$now_ends = Application_Common_Database::prepareAndExecute($sql,
|
||||||
array(':ends' => $ends,
|
array(':ends' => $ends,
|
||||||
':deltaDays' => "$deltaDay days",
|
':deltaDays' => "$deltaDay days",
|
||||||
':deltaTime' => "{$hours}:{$mins}"), 'column'
|
':deltaTime' => "{$hours}:{$mins}"), 'column'
|
||||||
|
@ -765,7 +765,7 @@ WHERE si.ends < :timeNow::TIMESTAMP
|
||||||
AND si.modified_instance = 'f'
|
AND si.modified_instance = 'f'
|
||||||
ORDER BY si.ends DESC LIMIT 1;
|
ORDER BY si.ends DESC LIMIT 1;
|
||||||
SQL;
|
SQL;
|
||||||
$id = Application_Common_Database( $sql, array(
|
$id = Application_Common_Database( $sql, array(
|
||||||
':timeNow' => $p_timeNow ), 'column' );
|
':timeNow' => $p_timeNow ), 'column' );
|
||||||
|
|
||||||
return ($id ? new Application_Model_ShowInstance($id) : null );
|
return ($id ? new Application_Model_ShowInstance($id) : null );
|
||||||
|
@ -818,7 +818,7 @@ SELECT count(*) AS cnt
|
||||||
FROM cc_show_instances
|
FROM cc_show_instances
|
||||||
WHERE ends < :day
|
WHERE ends < :day
|
||||||
SQL;
|
SQL;
|
||||||
return Application_Common_Database::prepareAndExecute( $sql,
|
return Application_Common_Database::prepareAndExecute( $sql,
|
||||||
array( ':day' => $day ), 'column' );
|
array( ':day' => $day ), 'column' );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -216,9 +216,9 @@ class Application_Model_Webstream implements Application_Model_LibraryEditable
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO : Fix this interface
|
// TODO : Fix this interface
|
||||||
|
//This function should not be defined in the interface.
|
||||||
public function setMetadata($key, $val)
|
public function setMetadata($key, $val)
|
||||||
{
|
{
|
||||||
//This function should not be defined in the interface.
|
|
||||||
throw new Exception("Not implemented.");
|
throw new Exception("Not implemented.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -366,7 +366,7 @@ var AIRTIME = (function(AIRTIME){
|
||||||
//and verify whether they can be previewed by the browser or not. If not
|
//and verify whether they can be previewed by the browser or not. If not
|
||||||
//then the playlist element is greyed out
|
//then the playlist element is greyed out
|
||||||
mod.validatePlaylistElements = function(){
|
mod.validatePlaylistElements = function(){
|
||||||
$.each($(".big_play"), function(index, value){
|
$.each($(".big_play ui-icon-play"), function(index, value){
|
||||||
if ($(value).attr('blockId') === undefined) {
|
if ($(value).attr('blockId') === undefined) {
|
||||||
var mime = $(value).attr("data-mime-type");
|
var mime = $(value).attr("data-mime-type");
|
||||||
if (isAudioSupported(mime)) {
|
if (isAudioSupported(mime)) {
|
||||||
|
|
|
@ -15,9 +15,10 @@ $(document).ready(function(){
|
||||||
close: doNotShowPopup,
|
close: doNotShowPopup,
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
id: "remind_me",
|
id: "remind_me",
|
||||||
text: "Remind me in 1 week",
|
text: "Remind me in 1 week",
|
||||||
click: function() {
|
"class": "btn",
|
||||||
|
click: function() {
|
||||||
var url = '/Usersettings/remindme';
|
var url = '/Usersettings/remindme';
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: url,
|
url: url,
|
||||||
|
@ -29,6 +30,7 @@ $(document).ready(function(){
|
||||||
{
|
{
|
||||||
id: "remind_never",
|
id: "remind_never",
|
||||||
text: "Remind me never",
|
text: "Remind me never",
|
||||||
|
"class": "btn",
|
||||||
click: function() {
|
click: function() {
|
||||||
var url ='/Usersettings/remindme-never';
|
var url ='/Usersettings/remindme-never';
|
||||||
$.ajax({
|
$.ajax({
|
||||||
|
@ -41,6 +43,7 @@ $(document).ready(function(){
|
||||||
{
|
{
|
||||||
id: "help_airtime",
|
id: "help_airtime",
|
||||||
text: "Yes, help Airtime",
|
text: "Yes, help Airtime",
|
||||||
|
"class": "btn",
|
||||||
click: function() {
|
click: function() {
|
||||||
$("#register-form").submit();
|
$("#register-form").submit();
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,11 +41,13 @@ stream_harbor_pass = list.hd(get_process_lines('pwgen -s -N 1 -n 20'))
|
||||||
|
|
||||||
web_stream = input.harbor("test-harbor", port=8999, password=stream_harbor_pass)
|
web_stream = input.harbor("test-harbor", port=8999, password=stream_harbor_pass)
|
||||||
web_stream = on_metadata(notify_stream, web_stream)
|
web_stream = on_metadata(notify_stream, web_stream)
|
||||||
|
output.dummy(fallible=true, web_stream)
|
||||||
|
|
||||||
queue = on_metadata(notify, queue)
|
queue = on_metadata(notify, queue)
|
||||||
queue = map_metadata(update=false, append_title, queue)
|
queue = map_metadata(update=false, append_title, queue)
|
||||||
# the crossfade function controls fade in/out
|
# the crossfade function controls fade in/out
|
||||||
queue = crossfade(queue)
|
queue = crossfade(queue)
|
||||||
|
output.dummy(fallible=true, queue)
|
||||||
|
|
||||||
|
|
||||||
stream_queue = switch(id="stream_queue_switch", track_sensitive=false,
|
stream_queue = switch(id="stream_queue_switch", track_sensitive=false,
|
||||||
|
|
|
@ -191,7 +191,7 @@ class PypoPush(Thread):
|
||||||
if self.current_stream_info is None:
|
if self.current_stream_info is None:
|
||||||
correct = False
|
correct = False
|
||||||
else:
|
else:
|
||||||
correct = self.current_stream_info['uri'] == media_item['uri']
|
correct = self.current_stream_info['row_id'] == media_item['row_id']
|
||||||
|
|
||||||
self.logger.debug("Is current item correct?: %s", str(correct))
|
self.logger.debug("Is current item correct?: %s", str(correct))
|
||||||
return correct
|
return correct
|
||||||
|
|
Loading…
Reference in New Issue