From 6035658db9a8eb04d90fabd3c8e1f884b09ef844 Mon Sep 17 00:00:00 2001 From: ScrubN <72096833+ScrubN@users.noreply.github.com> Date: Thu, 6 Jun 2024 16:44:35 -0400 Subject: [PATCH] Fix CLI ffmpeg downloader crashing --- TwitchDownloaderCLI/Modes/FfmpegHandler.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/TwitchDownloaderCLI/Modes/FfmpegHandler.cs b/TwitchDownloaderCLI/Modes/FfmpegHandler.cs index 07319990..9feb2a05 100644 --- a/TwitchDownloaderCLI/Modes/FfmpegHandler.cs +++ b/TwitchDownloaderCLI/Modes/FfmpegHandler.cs @@ -86,6 +86,8 @@ public XabeProgressHandler(ITaskProgress progress) progress.SetTemplateStatus("Downloading FFmpeg {0}%", 0); _timer = new Timer(_ => { + if (_percentQueue.IsEmpty) return; + progress.ReportProgress(_percentQueue.Max()); }, null, 0, 100); }