diff --git a/TwitchDownloaderCLI/Models/TimeDuration.cs b/TwitchDownloaderCLI/Models/TimeDuration.cs index abf7489f..67daabf9 100644 --- a/TwitchDownloaderCLI/Models/TimeDuration.cs +++ b/TwitchDownloaderCLI/Models/TimeDuration.cs @@ -8,6 +8,8 @@ namespace TwitchDownloaderCLI.Models [DebuggerDisplay("{_timeSpan}")] public readonly record struct TimeDuration { + public static TimeDuration MinusOneSeconds { get; } = new(-1 * TimeSpan.TicksPerSecond); + private readonly TimeSpan _timeSpan; /// diff --git a/TwitchDownloaderCLI/Modes/Arguments/ChatRenderArgs.cs b/TwitchDownloaderCLI/Modes/Arguments/ChatRenderArgs.cs index 1098a9d8..29238b65 100644 --- a/TwitchDownloaderCLI/Modes/Arguments/ChatRenderArgs.cs +++ b/TwitchDownloaderCLI/Modes/Arguments/ChatRenderArgs.cs @@ -28,10 +28,10 @@ internal sealed class ChatRenderArgs : TwitchDownloaderArgs public int ChatHeight { get; set; } [Option('b', "beginning", HelpText = "Time to trim the beginning of the render. Can be milliseconds (#ms), seconds (#s), minutes (#m), hours (#h), or time (##:##:##).")] - public TimeDuration TrimBeginningTime { get; set; } = new(-1); + public TimeDuration TrimBeginningTime { get; set; } = TimeDuration.MinusOneSeconds; [Option('e', "ending", HelpText = "Time to trim the ending of the render. Can be milliseconds (#ms), seconds (#s), minutes (#m), hours (#h), or time (##:##:##).")] - public TimeDuration TrimEndingTime { get; set; } = new(-1); + public TimeDuration TrimEndingTime { get; set; } = TimeDuration.MinusOneSeconds; [Option("bttv", Default = true, HelpText = "Enable BTTV emotes.")] public bool? BttvEmotes { get; set; } diff --git a/TwitchDownloaderCLI/Modes/Arguments/ChatUpdateArgs.cs b/TwitchDownloaderCLI/Modes/Arguments/ChatUpdateArgs.cs index f41b23b4..7818dc6d 100644 --- a/TwitchDownloaderCLI/Modes/Arguments/ChatUpdateArgs.cs +++ b/TwitchDownloaderCLI/Modes/Arguments/ChatUpdateArgs.cs @@ -23,10 +23,10 @@ internal sealed class ChatUpdateArgs : TwitchDownloaderArgs public bool ReplaceEmbeds { get; set; } [Option('b', "beginning", HelpText = "New time for chat beginning. Can be milliseconds (#ms), seconds (#s), minutes (#m), hours (#h), or time (##:##:##). Comments may be added but not removed. -1 = Keep current trim.")] - public TimeDuration TrimBeginningTime { get; set; } = new(-1); + public TimeDuration TrimBeginningTime { get; set; } = TimeDuration.MinusOneSeconds; [Option('e', "ending", HelpText = "New time for chat ending. Can be milliseconds (#ms), seconds (#s), minutes (#m), hours (#h), or time (##:##:##). Comments may be added but not removed. -1 = Keep current trim.")] - public TimeDuration TrimEndingTime { get; set; } = new(-1); + public TimeDuration TrimEndingTime { get; set; } = TimeDuration.MinusOneSeconds; [Option("bttv", Default = true, HelpText = "Enable BTTV embedding in chat download.")] public bool? BttvEmotes { get; set; }