Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix default trims for chat render & chat update #1053

Merged
merged 1 commit into from
May 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading