CC-4882: Scheduled item does not take into account cue_out - cue_in time
-fixed
This commit is contained in:
parent
2ef8604c31
commit
f1215c10fd
|
@ -136,13 +136,17 @@ class Application_Model_Scheduler
|
|||
|
||||
if ($type === "audioclip") {
|
||||
$file = CcFilesQuery::create()->findPK($id, $this->con);
|
||||
$storedFile = new Application_Model_StoredFile($file->getDbId());
|
||||
|
||||
if (is_null($file) || !$file->visible()) {
|
||||
throw new Exception(_("A selected File does not exist!"));
|
||||
} else {
|
||||
$data = $this->fileInfo;
|
||||
$data["id"] = $id;
|
||||
$data["cliplength"] = $file->getDbLength();
|
||||
$data["cliplength"] = $storedFile->getRealClipLength(
|
||||
$file->getDbCuein(),
|
||||
$file->getDbCueout());
|
||||
|
||||
$data["cuein"] = $file->getDbCuein();
|
||||
$data["cueout"] = $file->getDbCueout();
|
||||
|
||||
|
@ -438,7 +442,6 @@ class Application_Model_Scheduler
|
|||
}
|
||||
|
||||
foreach ($schedFiles as $file) {
|
||||
|
||||
$endTimeDT = $this->findEndTime($nextStartDT, $file['cliplength']);
|
||||
|
||||
//item existed previously and is being moved.
|
||||
|
|
|
@ -1285,6 +1285,14 @@ SQL;
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function getRealClipLength($p_cuein, $p_cueout) {
|
||||
$sql = "SELECT :cueout::INTERVAL - :cuein::INTERVAL";
|
||||
|
||||
return Application_Common_Database::prepareAndExecute($sql, array(
|
||||
':cueout' => $p_cueout,
|
||||
':cuein' => $p_cuein), 'column');
|
||||
}
|
||||
}
|
||||
|
||||
class DeleteScheduledFileException extends Exception {}
|
||||
|
|
Loading…
Reference in New Issue