CC-2301 : fades editor saving offset to database for playlists and smart blocks.
This commit is contained in:
parent
2e03e1982f
commit
0db557a570
15 changed files with 295 additions and 108 deletions
|
@ -653,17 +653,13 @@ SQL;
|
|||
* $fadeIn length of fade in in seconds of $id2
|
||||
* $offset time in seconds from end of $id1 that $id2 will begin to play.
|
||||
*/
|
||||
public function createCrossfade($id1, $id2, $fadeIn, $fadeOut, $offset)
|
||||
public function createCrossfade($id1, $fadeOut, $id2, $fadeIn, $offset)
|
||||
{
|
||||
$this->con->beginTransaction();
|
||||
|
||||
try {
|
||||
$this->changeFadeInfo($id1, null, $fadeOut);
|
||||
$this->changeFadeInfo($id2, $fadeIn, null);
|
||||
|
||||
$item = CcPlaylistcontentsQuery::create()->findPK($id2);
|
||||
$item->setDbOffset($offset);
|
||||
$item->save($this->con);
|
||||
$this->changeFadeInfo($id2, $fadeIn, null, $offset);
|
||||
|
||||
$this->con->commit();
|
||||
|
||||
|
@ -684,7 +680,7 @@ SQL;
|
|||
* new value in ss.ssssss or extent format
|
||||
* @return boolean
|
||||
*/
|
||||
public function changeFadeInfo($id, $fadeIn, $fadeOut)
|
||||
public function changeFadeInfo($id, $fadeIn, $fadeOut, $offset=null)
|
||||
{
|
||||
//See issue CC-2065, pad the fadeIn and fadeOut so that it is TIME compatable with the DB schema
|
||||
//For the top level PlayList either fadeIn or fadeOut will sometimes be Null so need a gaurd against
|
||||
|
@ -710,6 +706,12 @@ SQL;
|
|||
$fadeIn = $clipLength;
|
||||
}
|
||||
$row->setDbFadein($fadeIn);
|
||||
|
||||
if (!is_null($offset)) {
|
||||
$row->setDbTrackOffset($offset);
|
||||
Logging::info("Setting offset {$offset} on item {$id}");
|
||||
$row->save($this->con);
|
||||
}
|
||||
}
|
||||
if (!is_null($fadeOut)) {
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue