fixed crash when making playlists from web client
This commit is contained in:
parent
4900181241
commit
68d031e612
1 changed files with 27 additions and 2 deletions
|
@ -162,7 +162,14 @@ class Playlist extends StoredFile {
|
||||||
|
|
||||||
// insert new playlist element
|
// insert new playlist element
|
||||||
$offset = $plLen;
|
$offset = $plLen;
|
||||||
$plElInfo = $this->insertPlaylistElement($parid, $offset,
|
|
||||||
|
// insert default values until UI starts supporting clip in / clip out
|
||||||
|
$clipStart = 00.000000;
|
||||||
|
$clipEnd = $acLen;
|
||||||
|
$clipLength = $acLen;
|
||||||
|
|
||||||
|
|
||||||
|
$plElInfo = $this->insertPlaylistElement($parid, $offset, $clipStart, $clipEnd, $clipLength,
|
||||||
$acGunid, $acLen, $acTit, $fadeIn, $fadeOut, $plElGunid,
|
$acGunid, $acLen, $acTit, $fadeIn, $fadeOut, $plElGunid,
|
||||||
$elType);
|
$elType);
|
||||||
if (PEAR::isError($plElInfo)) {
|
if (PEAR::isError($plElInfo)) {
|
||||||
|
@ -1025,7 +1032,7 @@ class Playlist extends StoredFile {
|
||||||
* <li>fadeOutId int - record id</li>
|
* <li>fadeOutId int - record id</li>
|
||||||
* </ul>
|
* </ul>
|
||||||
*/
|
*/
|
||||||
private function insertPlaylistElement($parid, $offset, $acGunid, $acLen, $acTit,
|
private function insertPlaylistElement($parid, $offset, $clipStart, $clipEnd, $clipLength, $acGunid, $acLen, $acTit,
|
||||||
$fadeIn=NULL, $fadeOut=NULL, $plElGunid=NULL, $elType='audioClip')
|
$fadeIn=NULL, $fadeOut=NULL, $plElGunid=NULL, $elType='audioClip')
|
||||||
{
|
{
|
||||||
// insert playlistElement
|
// insert playlistElement
|
||||||
|
@ -1048,6 +1055,24 @@ class Playlist extends StoredFile {
|
||||||
if (PEAR::isError($r)) {
|
if (PEAR::isError($r)) {
|
||||||
return $r;
|
return $r;
|
||||||
}
|
}
|
||||||
|
// insert clipLength
|
||||||
|
$r = $this->md->insertMetadataElement(
|
||||||
|
$plElId, 'clipLength', $clipLength, 'A');
|
||||||
|
if (PEAR::isError($r)) {
|
||||||
|
return $r;
|
||||||
|
}
|
||||||
|
// insert clipStart
|
||||||
|
$r = $this->md->insertMetadataElement(
|
||||||
|
$plElId, 'clipStart', $clipStart, 'A');
|
||||||
|
if (PEAR::isError($r)) {
|
||||||
|
return $r;
|
||||||
|
}
|
||||||
|
// insert clipEnd
|
||||||
|
$r = $this->md->insertMetadataElement(
|
||||||
|
$plElId, 'clipEnd', $clipEnd, 'A');
|
||||||
|
if (PEAR::isError($r)) {
|
||||||
|
return $r;
|
||||||
|
}
|
||||||
// insert audioClip (or playlist) element into playlistElement
|
// insert audioClip (or playlist) element into playlistElement
|
||||||
$r = $this->md->insertMetadataElement($plElId, $elType);
|
$r = $this->md->insertMetadataElement($plElId, $elType);
|
||||||
if (PEAR::isError($r)) {
|
if (PEAR::isError($r)) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue