From fa95c9b0823c6e58c08eb038648c8b08b2576d77 Mon Sep 17 00:00:00 2001 From: ScrubN <72096833+ScrubN@users.noreply.github.com> Date: Tue, 28 Nov 2023 03:11:01 -0500 Subject: [PATCH] Only update embeds if the output format supports embeds --- TwitchDownloaderCore/ChatUpdater.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/TwitchDownloaderCore/ChatUpdater.cs b/TwitchDownloaderCore/ChatUpdater.cs index 5e1dd01f..faceb073 100644 --- a/TwitchDownloaderCore/ChatUpdater.cs +++ b/TwitchDownloaderCore/ChatUpdater.cs @@ -39,7 +39,8 @@ public async Task UpdateAsync(IProgress progress, CancellationTo int currentStep = 0; int totalSteps = 2; if (_updateOptions.CropBeginning || _updateOptions.CropEnding) totalSteps++; - if (_updateOptions.EmbedMissing || _updateOptions.ReplaceEmbeds) totalSteps++; + if (_updateOptions.OutputFormat is ChatFormat.Json or ChatFormat.Html + && (_updateOptions.EmbedMissing || _updateOptions.ReplaceEmbeds)) totalSteps++; currentStep++; await UpdateVideoInfo(totalSteps, currentStep, progress, cancellationToken); @@ -52,7 +53,8 @@ public async Task UpdateAsync(IProgress progress, CancellationTo } // If we are updating/replacing embeds - if (_updateOptions.EmbedMissing || _updateOptions.ReplaceEmbeds) + if (_updateOptions.OutputFormat is ChatFormat.Json or ChatFormat.Html + && (_updateOptions.EmbedMissing || _updateOptions.ReplaceEmbeds)) { currentStep++; await UpdateEmbeds(currentStep, totalSteps, progress, cancellationToken);