fix(legacy): scheduled show length should not add track fade times (#3144)

### Description

When generating a show that contains a playlist with dynamic blocks, the
show will be incorrectly under scheduled because the fade time was added
onto the total track length. Fade should not add time to an overall
track length as then it wouldn't be a fade.

**This is a new feature**:

No

**I have updated the documentation to reflect these changes**:

No, none needed.

### Testing Notes

**What I did:**

I created a playlist with 3 dynamic blocks:

1. 10 minute length dynamic block
2. 1 item dynamic block
3. fill rest of show dynamic block

I then created a show with the defined auto loading playlist. I then saw
that on auto-load the show was not under scheduled.

**How you can replicate my testing:**

See testing notes

Co-authored-by: Kyle Robbertze <paddatrapper@users.noreply.github.com>
This commit is contained in:
dakriy 2025-03-19 04:13:30 -07:00 committed by GitHub
parent c5548632e4
commit 5743a0f582
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1346,14 +1346,11 @@ final class Application_Model_Scheduler
// This is used to determine the duration of a files array
public function timeLengthOfFiles($files)
{
$timeLength = 0;
foreach ($files as $file) {
$timeLength += Application_Common_DateHelper::playlistTimeToSeconds($file['cliplength']);
$timeLength += $file['fadein'];
$timeLength += $file['fadeout'];
}
return $timeLength;
return array_reduce(
$files,
fn ($acc, $file) => $acc + Application_Common_DateHelper::playlistTimeToSeconds($file['cliplength']),
0.0
);
}
/*