From 4a7a08a1199136aeaf3a64fb0a8fd50a12dde39f Mon Sep 17 00:00:00 2001 From: denise Date: Wed, 29 May 2013 12:49:48 -0400 Subject: [PATCH] CC-5185: Liquidsoap: Sometimes the 1st track ends early when crossfading is set Crossfades were not getting applied to the track end time --- airtime_mvc/application/models/Scheduler.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/airtime_mvc/application/models/Scheduler.php b/airtime_mvc/application/models/Scheduler.php index 596cbc8d5..9768dbf33 100644 --- a/airtime_mvc/application/models/Scheduler.php +++ b/airtime_mvc/application/models/Scheduler.php @@ -712,6 +712,7 @@ class Application_Model_Scheduler } $endTimeDT = $this->findEndTime($nextStartDT, $file['cliplength']); + $endTimeDT = $this->findTimeDifference($endTimeDT, $this->crossfadeDuration); // default fades are in seconds // we need to convert to '00:00:00' format $file['fadein'] = Application_Common_DateHelper::secondsToPlaylistTime($file['fadein']); @@ -821,6 +822,7 @@ class Application_Model_Scheduler //recalculate the start/end times after the inserted items. foreach ($followingSchedItems as $item) { $endTimeDT = $this->findEndTime($nextStartDT, $item["clip_length"]); + $endTimeDT = $this->findTimeDifference($endTimeDT, $this->crossfadeDuration); $update_sql = "UPDATE cc_schedule SET ". "starts = '{$nextStartDT->format("Y-m-d H:i:s")}', ". "ends = '{$endTimeDT->format("Y-m-d H:i:s")}', ".