CC-5216: Library length does not consider cue points
This commit is contained in:
parent
ede618b3ad
commit
3b353b47b1
|
@ -194,14 +194,13 @@ class Application_Model_Scheduler
|
|||
|
||||
if ($type === "audioclip") {
|
||||
$file = CcFilesQuery::create()->findPK($id, $this->con);
|
||||
$storedFile = new Application_Model_StoredFile($file, $this->con);
|
||||
|
||||
if (is_null($file) || !$file->visible()) {
|
||||
throw new Exception(_("A selected File does not exist!"));
|
||||
} else {
|
||||
$data = $this->fileInfo;
|
||||
$data["id"] = $id;
|
||||
$data["cliplength"] = $storedFile->getRealClipLength(
|
||||
$data["cliplength"] = Application_Model_StoredFile::getRealClipLength(
|
||||
$file->getDbCuein(),
|
||||
$file->getDbCueout());
|
||||
|
||||
|
|
|
@ -778,7 +778,8 @@ SQL;
|
|||
foreach ($results['aaData'] as &$row) {
|
||||
$row['id'] = intval($row['id']);
|
||||
|
||||
$len_formatter = new LengthFormatter($row['length']);
|
||||
$len_formatter = new LengthFormatter(
|
||||
self::getRealClipLength($row["cuein"], $row["cueout"]));
|
||||
$row['length'] = $len_formatter->format();
|
||||
|
||||
$cuein_formatter = new LengthFormatter($row["cuein"]);
|
||||
|
@ -1347,7 +1348,7 @@ SQL;
|
|||
Application_Common_Database::EXECUTE);
|
||||
}
|
||||
|
||||
public function getRealClipLength($p_cuein, $p_cueout) {
|
||||
public static function getRealClipLength($p_cuein, $p_cueout) {
|
||||
$sql = "SELECT :cueout::INTERVAL - :cuein::INTERVAL";
|
||||
|
||||
return Application_Common_Database::prepareAndExecute($sql, array(
|
||||
|
|
Loading…
Reference in New Issue