CC-4769: Duplicate Playlist: Fade in/out setting doesn't get copied correctly

- fixed
This commit is contained in:
James 2013-01-02 11:41:33 -05:00
parent 5e42695718
commit dcdbc3160d
3 changed files with 8 additions and 9 deletions

View File

@ -367,7 +367,8 @@ class LibraryController extends Zend_Controller_Action
$newPl->setDescription($originalPl->getDescription());
list($plFadeIn, ) = $originalPl->getFadeInfo(0);
list($plFadeOut, ) = $originalPl->getFadeInfo($originalPl->getSize()-1);
list(, $plFadeOut) = $originalPl->getFadeInfo($originalPl->getSize()-1);
$newPl->setfades($plFadeIn, $plFadeOut);
$newPl->setName("Copy of ".$originalPl->getName());
}

View File

@ -635,7 +635,7 @@ SQL;
//setting it to nonNull for checks down below
$fadeIn = $fadeIn?'00:00:'.$fadeIn:$fadeIn;
$fadeOut = $fadeOut?'00:00:'.$fadeOut:$fadeOut;
$this->con->beginTransaction();
try {
@ -646,7 +646,6 @@ SQL;
}
$clipLength = $row->getDbCliplength();
if (!is_null($fadeIn)) {
$sql = "SELECT :fadein::INTERVAL > INTERVAL '{$clipLength}'";
@ -665,11 +664,9 @@ SQL;
}
$row->setDbFadeout($fadeOut);
}
$row->save($this->con);
$this->pl->setDbMtime(new DateTime("now", new DateTimeZone("UTC")));
$this->pl->save($this->con);
$this->con->commit();
} catch (Exception $e) {
$this->con->rollback();
@ -690,7 +687,6 @@ SQL;
$this->changeFadeInfo($row->getDbId(), $fadein, null);
}
if (isset($fadeout)) {
Logging::info("Setting playlist fade out {$fadeout}");
$row = CcPlaylistcontentsQuery::create()

View File

@ -68,7 +68,8 @@ class CcPlaylistcontents extends BaseCcPlaylistcontents {
$this->fadein = $dt->format('H:i:s').".".$microsecond;
}
$this->modifiedColumns[] = CcPlaylistcontentsPeer::FADEIN;
$this->save();
return $this;
} // setDbFadein()
@ -105,7 +106,8 @@ class CcPlaylistcontents extends BaseCcPlaylistcontents {
$this->fadeout = $dt->format('H:i:s').".".$microsecond;
}
$this->modifiedColumns[] = CcPlaylistcontentsPeer::FADEOUT;
$this->save();
return $this;
} // setDbFadeout()