CC-4940: Playlist editor in Library ignores cue points set by silence detection when displaying item time

- fixed by setting length to cue_out - cue_in when tracks get added to playlist/block
This commit is contained in:
denise 2013-02-11 12:24:06 -05:00
parent e8bde50909
commit 69054806c4
2 changed files with 9 additions and 2 deletions

View file

@ -403,10 +403,13 @@ SQL;
$entry = $this->blockItem;
$entry["id"] = $file->getDbId();
$entry["pos"] = $pos;
$entry["cliplength"] = $file->getDbLength();
$entry["cueout"] = $file->getDbCueout();
$entry["cuein"] = $file->getDbCuein();
$cue_out = Application_Common_DateHelper::calculateLengthInSeconds($entry['cueout']);
$cue_in = Application_Common_DateHelper::calculateLengthInSeconds($entry['cuein']);
$entry["cliplength"] = $cue_out-$cue_in;
return $entry;
} else {
throw new Exception("trying to add a file that does not exist.");

View file

@ -398,14 +398,18 @@ SQL;
$entry = $this->plItem;
$entry["id"] = $obj->getDbId();
$entry["pos"] = $pos;
$entry["cliplength"] = $obj->getDbLength();
if ($obj instanceof CcFiles && $obj) {
$entry["cuein"] = $obj->getDbCuein();
$entry["cueout"] = $obj->getDbCueout();
$cue_out = Application_Common_DateHelper::calculateLengthInSeconds($entry['cueout']);
$cue_in = Application_Common_DateHelper::calculateLengthInSeconds($entry['cuein']);
$entry["cliplength"] = $cue_out-$cue_in;
} elseif ($obj instanceof CcWebstream && $obj) {
$entry["cuein"] = "00:00:00";
$entry["cueout"] = $entry["cliplength"];
}
$entry["cliplength"] = $obj->getDbLength();
$entry["ftype"] = $objType;
}