CC-2295 Improvements to playlist builder beha...CC-2303 Cue-in Cue-out inconsistency with time values:

-fixed
This commit is contained in:
denise 2012-10-11 11:49:04 -04:00
parent c95050c04c
commit 5f35336fd0
3 changed files with 31 additions and 15 deletions

View file

@ -229,10 +229,17 @@ SQL;
$formatter = new LengthFormatter($offset_cliplength);
$row['offset'] = $formatter->format();
//format the fades in format 00(.000000)
//format the fades in format 00(.0)
$fades = $this->getFadeInfo($row['position']);
$row['fadein'] = $fades[0];
$row['fadeout'] = $fades[1];
// format the cues in format 00:00:00(.0)
// we need to add the '.0' for cues and not fades
// because propel takes care of this for us
// (we use propel to fetch the fades)
$row['cuein'] = str_pad(substr($row['cuein'], 0, 10), 10, '.0');
$row['cueout'] = str_pad(substr($row['cueout'], 0, 10), 10, '.0');
//format original length
$formatter = new LengthFormatter($row['orig_length']);
@ -611,9 +618,10 @@ SQL;
#Propel returns values in form 00.000000 format which is for only seconds.
$fadeIn = $row->getDbFadein();
$fadeOut = $row->getDbFadeout();
//Propel returns values in form 00.000000 format which is for only seconds.
//We only want to display 1 decimal
$fadeIn = substr($row->getDbFadein(), 0, 4);
$fadeOut = substr($row->getDbFadeout(), 0, 4);
return array($fadeIn, $fadeOut);
}