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" /> (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 += (_,_) => diff --git a/Source/LibationWinForms/Dialogs/MessageBoxAlertAdminDialog.resx b/Source/LibationWinForms/Dialogs/MessageBoxAlertAdminDialog.resx index fe34710c..d2b8af7e 100644 --- a/Source/LibationWinForms/Dialogs/MessageBoxAlertAdminDialog.resx +++ b/Source/LibationWinForms/Dialogs/MessageBoxAlertAdminDialog.resx @@ -59,7 +59,7 @@ 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