@@ -268,6 +268,32 @@ public ChatDownloadOptions GetOptions(string filename)
268
268
else if ( radioCompressionGzip . IsChecked == true )
269
269
options . Compression = ChatCompression . Gzip ;
270
270
271
+ // TODO: Enable trimming clip chats
272
+ if ( downloadType is DownloadType . Video )
273
+ {
274
+ if ( CheckTrimStart . IsChecked == true )
275
+ {
276
+ options . TrimBeginning = true ;
277
+ TimeSpan start = new TimeSpan ( ( int ) numStartHour . Value , ( int ) numStartMinute . Value , ( int ) numStartSecond . Value ) ;
278
+ options . TrimBeginningTime = ( int ) start . TotalSeconds ;
279
+ }
280
+
281
+ if ( CheckTrimEnd . IsChecked == true )
282
+ {
283
+ options . TrimEnding = true ;
284
+ TimeSpan end = new TimeSpan ( ( int ) numEndHour . Value , ( int ) numEndMinute . Value , ( int ) numEndSecond . Value ) ;
285
+ options . TrimEndingTime = ( int ) end . TotalSeconds ;
286
+ }
287
+ }
288
+
289
+ if ( radioTimestampUTC . IsChecked == true )
290
+ options . TimeFormat = TimestampFormat . Utc ;
291
+ else if ( radioTimestampRelative . IsChecked == true )
292
+ options . TimeFormat = TimestampFormat . Relative ;
293
+ else if ( radioTimestampNone . IsChecked == true )
294
+ options . TimeFormat = TimestampFormat . None ;
295
+
296
+ options . Id = downloadId ;
271
297
options . EmbedData = checkEmbed . IsChecked . GetValueOrDefault ( ) ;
272
298
options . BttvEmotes = checkBttvEmbed . IsChecked . GetValueOrDefault ( ) ;
273
299
options . FfzEmotes = checkFfzEmbed . IsChecked . GetValueOrDefault ( ) ;
@@ -501,35 +527,6 @@ private async void SplitBtnDownload_Click(object sender, RoutedEventArgs e)
501
527
try
502
528
{
503
529
ChatDownloadOptions downloadOptions = GetOptions ( saveFileDialog . FileName ) ;
504
- if ( downloadType == DownloadType . Video )
505
- {
506
- if ( CheckTrimStart . IsChecked == true )
507
- {
508
- downloadOptions . TrimBeginning = true ;
509
- TimeSpan start = new TimeSpan ( ( int ) numStartHour . Value , ( int ) numStartMinute . Value , ( int ) numStartSecond . Value ) ;
510
- downloadOptions . TrimBeginningTime = ( int ) start . TotalSeconds ;
511
- }
512
-
513
- if ( CheckTrimEnd . IsChecked == true )
514
- {
515
- downloadOptions . TrimEnding = true ;
516
- TimeSpan end = new TimeSpan ( ( int ) numEndHour . Value , ( int ) numEndMinute . Value , ( int ) numEndSecond . Value ) ;
517
- downloadOptions . TrimEndingTime = ( int ) end . TotalSeconds ;
518
- }
519
-
520
- downloadOptions . Id = downloadId ;
521
- }
522
- else
523
- {
524
- downloadOptions . Id = downloadId ;
525
- }
526
-
527
- if ( radioTimestampUTC . IsChecked == true )
528
- downloadOptions . TimeFormat = TimestampFormat . Utc ;
529
- else if ( radioTimestampRelative . IsChecked == true )
530
- downloadOptions . TimeFormat = TimestampFormat . Relative ;
531
- else if ( radioTimestampNone . IsChecked == true )
532
- downloadOptions . TimeFormat = TimestampFormat . None ;
533
530
534
531
var downloadProgress = new WpfTaskProgress ( ( LogLevel ) Settings . Default . LogLevels , SetPercent , SetStatus , AppendLog ) ;
535
532
var currentDownload = new ChatDownloader ( downloadOptions , downloadProgress ) ;
0 commit comments