Skip to content

Commit

Permalink
Fix default trims for chat render & chat update (#1053)
Browse files Browse the repository at this point in the history
  • Loading branch information
ScrubN authored May 9, 2024
1 parent b81a6eb commit 7a0f52c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions TwitchDownloaderCLI/Models/TimeDuration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/// <summary>
Expand Down
4 changes: 2 additions & 2 deletions TwitchDownloaderCLI/Modes/Arguments/ChatRenderArgs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand Down
4 changes: 2 additions & 2 deletions TwitchDownloaderCLI/Modes/Arguments/ChatUpdateArgs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand Down

0 comments on commit 7a0f52c

Please sign in to comment.