From 01d6608d83465f8845802b8885d3941703be78fd Mon Sep 17 00:00:00 2001 From: NeoCoderMatrix86 <40752681+NeoCoderMatrix86@users.noreply.github.com> Date: Fri, 19 Apr 2024 09:54:11 +0200 Subject: [PATCH] Update CuesheetSection.cs --- AudioCuesheetEditor/Model/IO/Export/CuesheetSection.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/AudioCuesheetEditor/Model/IO/Export/CuesheetSection.cs b/AudioCuesheetEditor/Model/IO/Export/CuesheetSection.cs index 4166b017..8fc38bc7 100644 --- a/AudioCuesheetEditor/Model/IO/Export/CuesheetSection.cs +++ b/AudioCuesheetEditor/Model/IO/Export/CuesheetSection.cs @@ -37,6 +37,13 @@ public CuesheetSection(Cuesheet cuesheet) artist = Cuesheet.Artist; title = Cuesheet.Title; audiofileName = Cuesheet.Audiofile?.Name; + //Try to set begin + begin = Cuesheet.Sections?.FirstOrDefault()?.End; + if (Begin.HasValue == false) + { + begin = Cuesheet.Tracks.Min(x => x.Begin); + } + end = Cuesheet.Tracks.Max(x => x.End); } [JsonConstructor]