Merge branch 'master' of dev.sourcefabric.org:airtime

This commit is contained in:
Martin Konecny 2013-05-08 13:47:37 -04:00
commit 357565bdcd
5 changed files with 24 additions and 2 deletions

View File

@ -33,6 +33,7 @@ class Application_Model_Block implements Application_Model_LibraryEditable
"cueout" => "00:00:00",
"fadein" => "0.0",
"fadeout" => "0.0",
"crossfadeDuration" => 0
);
//using propel's phpNames.
@ -101,6 +102,7 @@ class Application_Model_Block implements Application_Model_LibraryEditable
$this->blockItem["fadein"] = Application_Model_Preference::GetDefaultFadeIn();
$this->blockItem["fadeout"] = Application_Model_Preference::GetDefaultFadeOut();
$this->blockItem["crossfadeDuration"] = Application_Model_Preference::GetDefaultCrossfadeDuration();
$this->con = isset($con) ? $con : Propel::getConnection(CcBlockPeer::DATABASE_NAME);
$this->id = $this->block->getDbId();
@ -390,6 +392,7 @@ SQL;
$row->setDbCueout($info["cueout"]);
$row->setDbFadein(Application_Common_DateHelper::secondsToPlaylistTime($info["fadein"]));
$row->setDbFadeout(Application_Common_DateHelper::secondsToPlaylistTime($info["fadeout"]));
$row->setDbTrackOffset($info["crossfadeDuration"]);
$row->save($this->con);
// above save result update on cc_block table on length column.
// but $this->block doesn't get updated automatically

View File

@ -67,6 +67,11 @@ class Application_Service_CalendarService
"name"=> $text,
"icon" => "soundcloud");
}
} else {
$menu["content"] = array(
"name"=> _("Show Content"),
"icon" => "overview",
"url" => $baseUrl."schedule/show-content-dialog");
}
} else {
//Show content can be modified from the calendar if:

View File

@ -68,8 +68,12 @@ class Application_Service_SchedulerService
$ccSchedules = CcScheduleQuery::create()
->filterByDbInstanceId($instanceIds, Criteria::IN)
->find();
$interval = new DateInterval("PT".abs($diff)."S");
if ($diff < 0) {
$interval->invert = 1;
}
foreach ($ccSchedules as $ccSchedule) {
$interval = new DateInterval("PT".$diff."S");
$start = new DateTime($ccSchedule->getDbStarts());
$newStart = $start->add($interval);
$end = new DateTime($ccSchedule->getDbEnds());

View File

@ -82,7 +82,9 @@ AudioPlayout.prototype.loadData = function (audioData, cb) {
that.buffer = buffer;
cb(buffer);
},
Error
function(err) {
console.log("err(decodeAudioData): "+err);
}
);
};

View File

@ -3,3 +3,11 @@ INSERT INTO cc_pref (keystr, valstr) VALUES ('system_version', '2.4.0');
DELETE FROM cc_pref WHERE keystr = 'stream_type';
INSERT INTO cc_pref (keystr, valstr) VALUES ('stream_type', 'ogg, mp3, opus, aac');
UPDATE cc_files
SET is_scheduled = true
WHERE id IN (SELECT DISTINCT(file_id) FROM cc_schedule WHERE playout_status != -1);
UPDATE cc_files
SET is_playlist = true
WHERE id IN (SELECT DISTINCT(file_id) FROM cc_playlistcontents);