From b39e2c3e0be51761b8592e53b566e9dc1c045227 Mon Sep 17 00:00:00 2001 From: Sebastian Good <2230835+scagood@users.noreply.github.com> Date: Fri, 30 Jan 2026 15:29:57 +0000 Subject: [PATCH 1/2] Remove progress bar in non interactive mode (#1481) --- .../LibationCli/Options/_ProcessableOptionsBase.cs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Source/LibationCli/Options/_ProcessableOptionsBase.cs b/Source/LibationCli/Options/_ProcessableOptionsBase.cs index 1b1f30f9..b7d1cf94 100644 --- a/Source/LibationCli/Options/_ProcessableOptionsBase.cs +++ b/Source/LibationCli/Options/_ProcessableOptionsBase.cs @@ -20,10 +20,16 @@ namespace LibationCli protected static TProcessable CreateProcessable(EventHandler? completedAction = null) where TProcessable : Processable, IProcessable { - var progressBar = new ConsoleProgressBar(Console.Out); var strProc = TProcessable.Create(Configuration.Instance); LibraryBook? currentLibraryBook = null; + if (Environment.UserInteractive && !Console.IsOutputRedirected && !Console.IsErrorRedirected) { + var progressBar = new ConsoleProgressBar(Console.Out); + strProc.Completed += (_, e) => progressBar.Clear(); + strProc.StreamingTimeRemaining += (_, e) => progressBar.RemainingTime = e; + strProc.StreamingProgressChanged += (_, e) => progressBar.Progress = e.ProgressPercentage; + } + strProc.Begin += (o, e) => { currentLibraryBook = e; @@ -32,7 +38,6 @@ namespace LibationCli strProc.Completed += (o, e) => { - progressBar.Clear(); Console.WriteLine($"{typeof(TProcessable).Name} Completed: {e}"); }; @@ -49,9 +54,6 @@ namespace LibationCli } }; - strProc.StreamingTimeRemaining += (_, e) => progressBar.RemainingTime = e; - strProc.StreamingProgressChanged += (_, e) => progressBar.Progress = e.ProgressPercentage; - if (strProc is AudioDecodable audDec) { audDec.RequestCoverArt += (_,_) => From 5c56e1d39be2d074f85e2d93716ca996bcf35810 Mon Sep 17 00:00:00 2001 From: Sebastian Good <2230835+scagood@users.noreply.github.com> Date: Fri, 30 Jan 2026 16:06:15 +0000 Subject: [PATCH 2/2] Correct small spelling mistake --- .../LibationAvalonia/Dialogs/MessageBoxAlertAdminDialog.axaml | 2 +- Source/LibationWinForms/Dialogs/MessageBoxAlertAdminDialog.resx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/LibationAvalonia/Dialogs/MessageBoxAlertAdminDialog.axaml b/Source/LibationAvalonia/Dialogs/MessageBoxAlertAdminDialog.axaml index 410de601..84a5d9aa 100644 --- a/Source/LibationAvalonia/Dialogs/MessageBoxAlertAdminDialog.axaml +++ b/Source/LibationAvalonia/Dialogs/MessageBoxAlertAdminDialog.axaml @@ -40,7 +40,7 @@ + Text="If you'd like to report this error to an administrator: Step 1: Go to Libation's "issues" page on github Step 2: Find your log files Setp 3: Click "New issue" button Step 4: Drag/drop your log files" /> System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - If you'd like to report this error to an advinistrator: + If you'd like to report this error to an administrator: Step 1: Go to Libation's "issues" page on github Step 2: Find your log files