diff --git a/InternalUtilities/AudibleApiActions.cs b/InternalUtilities/AudibleApiActions.cs index a1cd2128..cee74fee 100644 --- a/InternalUtilities/AudibleApiActions.cs +++ b/InternalUtilities/AudibleApiActions.cs @@ -58,10 +58,19 @@ namespace InternalUtilities private static async Task> getItemsAsync(Api api, LibraryOptions.ResponseGroupOptions responseGroups) { - var items = await api.GetAllLibraryItemsAsync(responseGroups); + var items = new List(); #if DEBUG -//var itemsDebug = items.Select(i => i.ToJson()).Aggregate((a, b) => $"{a}\r\n\r\n{b}"); -//System.IO.File.WriteAllText("library.json", itemsDebug); +//// this will not work for multi accounts +//var library_json = "library.json"; +//if (System.IO.File.Exists(library_json)) +//{ +// items = AudibleApi.Common.Converter.FromJson>(System.IO.File.ReadAllText(library_json)); +//} +#endif + if (!items.Any()) + items = await api.GetAllLibraryItemsAsync(responseGroups); +#if DEBUG +//System.IO.File.WriteAllText("library.json", AudibleApi.Common.Converter.ToJson(items)); #endif await manageEpisodesAsync(api, items); diff --git a/InternalUtilities/InternalUtilities.csproj b/InternalUtilities/InternalUtilities.csproj index cd724b55..4b0bbf44 100644 --- a/InternalUtilities/InternalUtilities.csproj +++ b/InternalUtilities/InternalUtilities.csproj @@ -5,7 +5,7 @@ - + diff --git a/LibationLauncher/LibationLauncher.csproj b/LibationLauncher/LibationLauncher.csproj index a6bffb78..70bc758f 100644 --- a/LibationLauncher/LibationLauncher.csproj +++ b/LibationLauncher/LibationLauncher.csproj @@ -13,7 +13,7 @@ win-x64 - 5.6.6.1 + 5.6.7.1 diff --git a/LibationLauncher/Program.cs b/LibationLauncher/Program.cs index 3ef458b4..616bdf81 100644 --- a/LibationLauncher/Program.cs +++ b/LibationLauncher/Program.cs @@ -115,13 +115,13 @@ namespace LibationLauncher return; // path did not result in valid settings - MessageBox.Show( + var continueResult = MessageBox.Show( $"No valid settings were found at this location.\r\nWould you like to create a new install settings in this folder?\r\n\r\n{libationFilesDialog.SelectedDirectory}", "New install?", MessageBoxButtons.YesNo, MessageBoxIcon.Question); - if (libationFilesDialog.ShowDialog() != DialogResult.Yes) + if (continueResult != DialogResult.Yes) { CancelInstallation(); return;