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']);
|
||||
|
||||
if ($success) {
|
||||
$scheduler = new Application_Model_Scheduler();
|
||||
$scheduler->removeGaps($data['add_show_instance_id']);
|
||||
$this->view->addNewShow = true;
|
||||
$this->view->newForm = $this->view->render('schedule/add-show-form.phtml');
|
||||
} else {
|
||||
|
|
|
@ -696,6 +696,7 @@ SQL;
|
|||
'start' => $start,
|
||||
'end' => $end,
|
||||
'show_name' => $item["show_name"],
|
||||
'row_id' => $item["id"],
|
||||
'independent_event' => true
|
||||
);
|
||||
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
|
||||
* 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);
|
||||
|
||||
|
|
|
@ -187,12 +187,12 @@ SQL;
|
|||
if ($diff != 0) {
|
||||
$sql = <<<SQL
|
||||
UPDATE cc_schedule
|
||||
SET starts = starts + INTERVAL :diff1 SECOND,
|
||||
ends = ends + INTERVAL :diff2 SECOND
|
||||
SET starts = starts + :diff1::INTERVAL SECOND,
|
||||
ends = ends + :diff2::INTERVAL SECOND
|
||||
WHERE instance_id = :instanceId
|
||||
SQL;
|
||||
Application_Common_Database::prepareAndExecute($sql,
|
||||
array(
|
||||
array(
|
||||
':diff1' => $diff,
|
||||
':diff2' => $diff,
|
||||
':instanceId' => $instance_id ), 'execute');
|
||||
|
@ -345,7 +345,7 @@ SQL;
|
|||
//$sql = "SELECT timestamp '{$ends}' + interval '{$deltaDay} days' + interval '{$hours}:{$mins}'";
|
||||
$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,
|
||||
':deltaDays' => "$deltaDay days",
|
||||
':deltaTime' => "{$hours}:{$mins}"), 'column'
|
||||
|
@ -765,7 +765,7 @@ WHERE si.ends < :timeNow::TIMESTAMP
|
|||
AND si.modified_instance = 'f'
|
||||
ORDER BY si.ends DESC LIMIT 1;
|
||||
SQL;
|
||||
$id = Application_Common_Database( $sql, array(
|
||||
$id = Application_Common_Database( $sql, array(
|
||||
':timeNow' => $p_timeNow ), 'column' );
|
||||
|
||||
return ($id ? new Application_Model_ShowInstance($id) : null );
|
||||
|
@ -818,7 +818,7 @@ SELECT count(*) AS cnt
|
|||
FROM cc_show_instances
|
||||
WHERE ends < :day
|
||||
SQL;
|
||||
return Application_Common_Database::prepareAndExecute( $sql,
|
||||
return Application_Common_Database::prepareAndExecute( $sql,
|
||||
array( ':day' => $day ), 'column' );
|
||||
}
|
||||
|
||||
|
|
|
@ -216,9 +216,9 @@ class Application_Model_Webstream implements Application_Model_LibraryEditable
|
|||
}
|
||||
|
||||
// TODO : Fix this interface
|
||||
//This function should not be defined in the interface.
|
||||
public function setMetadata($key, $val)
|
||||
{
|
||||
//This function should not be defined in the interface.
|
||||
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
|
||||
//then the playlist element is greyed out
|
||||
mod.validatePlaylistElements = function(){
|
||||
$.each($(".big_play"), function(index, value){
|
||||
$.each($(".big_play ui-icon-play"), function(index, value){
|
||||
if ($(value).attr('blockId') === undefined) {
|
||||
var mime = $(value).attr("data-mime-type");
|
||||
if (isAudioSupported(mime)) {
|
||||
|
|
|
@ -15,9 +15,10 @@ $(document).ready(function(){
|
|||
close: doNotShowPopup,
|
||||
buttons: [
|
||||
{
|
||||
id: "remind_me",
|
||||
text: "Remind me in 1 week",
|
||||
click: function() {
|
||||
id: "remind_me",
|
||||
text: "Remind me in 1 week",
|
||||
"class": "btn",
|
||||
click: function() {
|
||||
var url = '/Usersettings/remindme';
|
||||
$.ajax({
|
||||
url: url,
|
||||
|
@ -29,6 +30,7 @@ $(document).ready(function(){
|
|||
{
|
||||
id: "remind_never",
|
||||
text: "Remind me never",
|
||||
"class": "btn",
|
||||
click: function() {
|
||||
var url ='/Usersettings/remindme-never';
|
||||
$.ajax({
|
||||
|
@ -41,6 +43,7 @@ $(document).ready(function(){
|
|||
{
|
||||
id: "help_airtime",
|
||||
text: "Yes, help Airtime",
|
||||
"class": "btn",
|
||||
click: function() {
|
||||
$("#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 = on_metadata(notify_stream, web_stream)
|
||||
output.dummy(fallible=true, web_stream)
|
||||
|
||||
queue = on_metadata(notify, queue)
|
||||
queue = map_metadata(update=false, append_title, queue)
|
||||
# the crossfade function controls fade in/out
|
||||
queue = crossfade(queue)
|
||||
output.dummy(fallible=true, queue)
|
||||
|
||||
|
||||
stream_queue = switch(id="stream_queue_switch", track_sensitive=false,
|
||||
|
|
|
@ -191,7 +191,7 @@ class PypoPush(Thread):
|
|||
if self.current_stream_info is None:
|
||||
correct = False
|
||||
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))
|
||||
return correct
|
||||
|
|
Loading…
Reference in New Issue