From 3648de3a8da40699d9d749ab2b9f9c0261d81584 Mon Sep 17 00:00:00 2001 From: Michael Bucari-Tovo Date: Wed, 18 May 2022 09:47:09 -0600 Subject: [PATCH] restore the old functionality to the stoplight --- Source/LibationWinForms/Form1.ProcessQueue.cs | 24 ++++++++++--------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/Source/LibationWinForms/Form1.ProcessQueue.cs b/Source/LibationWinForms/Form1.ProcessQueue.cs index 74d30406..5e1ae9af 100644 --- a/Source/LibationWinForms/Form1.ProcessQueue.cs +++ b/Source/LibationWinForms/Form1.ProcessQueue.cs @@ -23,7 +23,18 @@ namespace LibationWinForms private void ProductsGrid_LiberateClicked(object sender, LibraryBook e) { - if (e.Book.UserDefinedItem.BookStatus != LiberatedStatus.Liberated) + if (e.Book.Audio_Exists()) + { + // liberated: open explorer to file + var filePath = AudibleFileStorage.Audio.GetPath(e.Book.AudibleProductId); + if (!Go.To.File(filePath)) + { + var suffix = string.IsNullOrWhiteSpace(filePath) ? "" : $":\r\n{filePath}"; + MessageBox.Show($"File not found" + suffix); + } + return; + } + else if (e.Book.UserDefinedItem.BookStatus != LiberatedStatus.Liberated) { SetQueueCollapseState(false); processBookQueue1.AddDownloadDecrypt(e); @@ -33,16 +44,7 @@ namespace LibationWinForms SetQueueCollapseState(false); processBookQueue1.AddDownloadPdf(e); } - else if (e.Book.Audio_Exists()) - { - // liberated: open explorer to file - var filePath = AudibleFileStorage.Audio.GetPath(e.Book.AudibleProductId); - if (!Go.To.File(filePath)) - { - var suffix = string.IsNullOrWhiteSpace(filePath) ? "" : $":\r\n{filePath}"; - MessageBox.Show($"File not found" + suffix); - } - } + } private void SetQueueCollapseState(bool collapsed)