From cd3e0dba684dafac3c63475d114b0fcde87514ac Mon Sep 17 00:00:00 2001 From: Robert McRackan Date: Sun, 4 Jul 2021 16:08:30 -0400 Subject: [PATCH] Remove validation against 0-length chapters. It is evidently allowed --- AaxDecrypter/Chapters.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/AaxDecrypter/Chapters.cs b/AaxDecrypter/Chapters.cs index dc0e9304..490de153 100644 --- a/AaxDecrypter/Chapters.cs +++ b/AaxDecrypter/Chapters.cs @@ -62,7 +62,8 @@ namespace AaxDecrypter { ArgumentValidator.EnsureNotNullOrEmpty(title, nameof(title)); ArgumentValidator.EnsureGreaterThan(startOffsetMs, nameof(startOffsetMs), -1); - ArgumentValidator.EnsureGreaterThan(lengthMs, nameof(lengthMs), 0); + + // do not validate lengthMs for '> 0'. It is valid to set sections this way. eg: 11-22-63 [B005UR3VFO] by Stephen King Title = title; StartOffset = TimeSpan.FromMilliseconds(startOffsetMs);