From d24550f521f6588886eead65e857584f9bdae54b Mon Sep 17 00:00:00 2001 From: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com> Date: Wed, 30 Aug 2023 18:43:31 +0300 Subject: [PATCH] Hide completed tasks in CLI when exporting in parallel Closes #1124 --- DiscordChatExporter.Cli/Commands/Base/ExportCommandBase.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/DiscordChatExporter.Cli/Commands/Base/ExportCommandBase.cs b/DiscordChatExporter.Cli/Commands/Base/ExportCommandBase.cs index 5612391..5b0647c 100644 --- a/DiscordChatExporter.Cli/Commands/Base/ExportCommandBase.cs +++ b/DiscordChatExporter.Cli/Commands/Base/ExportCommandBase.cs @@ -18,6 +18,7 @@ using DiscordChatExporter.Core.Exporting.Partitioning; using DiscordChatExporter.Core.Utils; using DiscordChatExporter.Core.Utils.Extensions; using Gress; +using Spectre.Console; namespace DiscordChatExporter.Cli.Commands.Base; @@ -168,6 +169,12 @@ public abstract class ExportCommandBase : DiscordCommandBase await console.Output.WriteLineAsync($"Exporting {channels.Count} channel(s)..."); await console .CreateProgressTicker() + .HideCompleted( + // When exporting multiple channels in parallel, hide the completed tasks + // because it gets hard to visually parse them as they complete out of order. + // https://github.com/Tyrrrz/DiscordChatExporter/issues/1124 + ParallelLimit > 1 + ) .StartAsync(async progressContext => { await Parallel.ForEachAsync(