CC-4769: Duplicate Playlist: Fade in/out setting doesn't get copied correctly
- fixed
This commit is contained in:
parent
5e42695718
commit
dcdbc3160d
|
@ -367,7 +367,8 @@ class LibraryController extends Zend_Controller_Action
|
||||||
$newPl->setDescription($originalPl->getDescription());
|
$newPl->setDescription($originalPl->getDescription());
|
||||||
|
|
||||||
list($plFadeIn, ) = $originalPl->getFadeInfo(0);
|
list($plFadeIn, ) = $originalPl->getFadeInfo(0);
|
||||||
list($plFadeOut, ) = $originalPl->getFadeInfo($originalPl->getSize()-1);
|
list(, $plFadeOut) = $originalPl->getFadeInfo($originalPl->getSize()-1);
|
||||||
|
|
||||||
$newPl->setfades($plFadeIn, $plFadeOut);
|
$newPl->setfades($plFadeIn, $plFadeOut);
|
||||||
$newPl->setName("Copy of ".$originalPl->getName());
|
$newPl->setName("Copy of ".$originalPl->getName());
|
||||||
}
|
}
|
||||||
|
|
|
@ -635,7 +635,7 @@ SQL;
|
||||||
//setting it to nonNull for checks down below
|
//setting it to nonNull for checks down below
|
||||||
$fadeIn = $fadeIn?'00:00:'.$fadeIn:$fadeIn;
|
$fadeIn = $fadeIn?'00:00:'.$fadeIn:$fadeIn;
|
||||||
$fadeOut = $fadeOut?'00:00:'.$fadeOut:$fadeOut;
|
$fadeOut = $fadeOut?'00:00:'.$fadeOut:$fadeOut;
|
||||||
|
|
||||||
$this->con->beginTransaction();
|
$this->con->beginTransaction();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -646,7 +646,6 @@ SQL;
|
||||||
}
|
}
|
||||||
|
|
||||||
$clipLength = $row->getDbCliplength();
|
$clipLength = $row->getDbCliplength();
|
||||||
|
|
||||||
if (!is_null($fadeIn)) {
|
if (!is_null($fadeIn)) {
|
||||||
|
|
||||||
$sql = "SELECT :fadein::INTERVAL > INTERVAL '{$clipLength}'";
|
$sql = "SELECT :fadein::INTERVAL > INTERVAL '{$clipLength}'";
|
||||||
|
@ -665,11 +664,9 @@ SQL;
|
||||||
}
|
}
|
||||||
$row->setDbFadeout($fadeOut);
|
$row->setDbFadeout($fadeOut);
|
||||||
}
|
}
|
||||||
|
|
||||||
$row->save($this->con);
|
|
||||||
$this->pl->setDbMtime(new DateTime("now", new DateTimeZone("UTC")));
|
$this->pl->setDbMtime(new DateTime("now", new DateTimeZone("UTC")));
|
||||||
$this->pl->save($this->con);
|
$this->pl->save($this->con);
|
||||||
|
|
||||||
$this->con->commit();
|
$this->con->commit();
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
$this->con->rollback();
|
$this->con->rollback();
|
||||||
|
@ -690,7 +687,6 @@ SQL;
|
||||||
|
|
||||||
$this->changeFadeInfo($row->getDbId(), $fadein, null);
|
$this->changeFadeInfo($row->getDbId(), $fadein, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($fadeout)) {
|
if (isset($fadeout)) {
|
||||||
Logging::info("Setting playlist fade out {$fadeout}");
|
Logging::info("Setting playlist fade out {$fadeout}");
|
||||||
$row = CcPlaylistcontentsQuery::create()
|
$row = CcPlaylistcontentsQuery::create()
|
||||||
|
|
|
@ -68,7 +68,8 @@ class CcPlaylistcontents extends BaseCcPlaylistcontents {
|
||||||
$this->fadein = $dt->format('H:i:s').".".$microsecond;
|
$this->fadein = $dt->format('H:i:s').".".$microsecond;
|
||||||
}
|
}
|
||||||
$this->modifiedColumns[] = CcPlaylistcontentsPeer::FADEIN;
|
$this->modifiedColumns[] = CcPlaylistcontentsPeer::FADEIN;
|
||||||
|
$this->save();
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
} // setDbFadein()
|
} // setDbFadein()
|
||||||
|
|
||||||
|
@ -105,7 +106,8 @@ class CcPlaylistcontents extends BaseCcPlaylistcontents {
|
||||||
$this->fadeout = $dt->format('H:i:s').".".$microsecond;
|
$this->fadeout = $dt->format('H:i:s').".".$microsecond;
|
||||||
}
|
}
|
||||||
$this->modifiedColumns[] = CcPlaylistcontentsPeer::FADEOUT;
|
$this->modifiedColumns[] = CcPlaylistcontentsPeer::FADEOUT;
|
||||||
|
$this->save();
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
} // setDbFadeout()
|
} // setDbFadeout()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue