Skip to content

Commit

Permalink
Fix clip chats
Browse files Browse the repository at this point in the history
  • Loading branch information
ScrubN committed Jul 29, 2024
1 parent 6e3a182 commit 88d6a48
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions TwitchDownloaderWPF/PageChatDownload.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -268,18 +268,22 @@ public ChatDownloadOptions GetOptions(string filename)
else if (radioCompressionGzip.IsChecked == true)
options.Compression = ChatCompression.Gzip;

if (CheckTrimStart.IsChecked == true)
// TODO: Enable trimming clip chats
if (downloadType is DownloadType.Video)
{
options.TrimBeginning = true;
TimeSpan start = new TimeSpan((int)numStartHour.Value, (int)numStartMinute.Value, (int)numStartSecond.Value);
options.TrimBeginningTime = (int)start.TotalSeconds;
}
if (CheckTrimStart.IsChecked == true)
{
options.TrimBeginning = true;
TimeSpan start = new TimeSpan((int)numStartHour.Value, (int)numStartMinute.Value, (int)numStartSecond.Value);
options.TrimBeginningTime = (int)start.TotalSeconds;
}

if (CheckTrimEnd.IsChecked == true)
{
options.TrimEnding = true;
TimeSpan end = new TimeSpan((int)numEndHour.Value, (int)numEndMinute.Value, (int)numEndSecond.Value);
options.TrimEndingTime = (int)end.TotalSeconds;
if (CheckTrimEnd.IsChecked == true)
{
options.TrimEnding = true;
TimeSpan end = new TimeSpan((int)numEndHour.Value, (int)numEndMinute.Value, (int)numEndSecond.Value);
options.TrimEndingTime = (int)end.TotalSeconds;
}
}

if (radioTimestampUTC.IsChecked == true)
Expand Down

0 comments on commit 88d6a48

Please sign in to comment.