CC-4819: Tracks length in Scheduler is 0.0 all the time

- fixed in better way
This commit is contained in:
James 2013-01-10 11:49:02 -05:00
parent 0aeea61006
commit 4bf9ab60d9
2 changed files with 7 additions and 5 deletions

View file

@ -129,9 +129,15 @@ class Application_Model_StoredFile
# Translate metadata attributes from media monitor (MDATA_KEY_*)
# to their counterparts in constants.php (usually the column names)
$track_length = $p_md['MDATA_KEY_DURATION'];
$track_length_in_sec = Application_Common_DateHelper::calculateLengthInSeconds($track_length);
foreach ($p_md as $mdConst => $mdValue) {
if (defined($mdConst)) {
if ($mdConst == "MDATA_KEY_CUE_OUT" && $mdValue == '0.0') {
$mdValue = $track_length_in_sec;
}
$dbMd[constant($mdConst)] = $mdValue;
} else {
Logging::warn("using metadata that is not defined.
[$mdConst] => [$mdValue]");