CC-5180: Now Playing: No crossfading effects if inserting tracks one by one

This commit is contained in:
denise 2013-05-29 09:41:06 -04:00
parent 1e9829e85c
commit be59810810

View file

@ -612,6 +612,11 @@ class Application_Model_Scheduler
$instanceId);
$pos++;
/* Show is not empty so we need to apply crossfades
* for the first inserted item
*/
$applyCrossfades = true;
}
//selected empty row to add after
else {
@ -620,6 +625,11 @@ class Application_Model_Scheduler
//first item in show so start position counter at 0
$pos = 0;
/* Show is empty so we don't need to calculate crossfades
* for the first inserted item
*/
$applyCrossfades = false;
}
if (!in_array($instanceId, $affectedShowInstances)) {
@ -714,6 +724,15 @@ class Application_Model_Scheduler
default: break;
}
if ($applyCrossfades) {
$nextStartDT = $this->findTimeDifference($nextStartDT,
$this->crossfadeDuration);
/* Set it to false because the rest of the crossfades
* will be applied after we insert each item
*/
$applyCrossfades = false;
}
if ($doInsert) {
$values[] = "(".
"'{$nextStartDT->format("Y-m-d H:i:s")}', ".