bug fix: installer bug for users who say 'return user' but don't have valid files

This commit is contained in:
Robert McRackan 2021-09-07 16:58:04 -04:00
parent c337c0b44e
commit 5f0a6b8526
4 changed files with 16 additions and 7 deletions

View File

@ -58,10 +58,19 @@ namespace InternalUtilities
private static async Task<List<Item>> getItemsAsync(Api api, LibraryOptions.ResponseGroupOptions responseGroups) private static async Task<List<Item>> getItemsAsync(Api api, LibraryOptions.ResponseGroupOptions responseGroups)
{ {
var items = await api.GetAllLibraryItemsAsync(responseGroups); var items = new List<Item>();
#if DEBUG #if DEBUG
//var itemsDebug = items.Select(i => i.ToJson()).Aggregate((a, b) => $"{a}\r\n\r\n{b}"); //// this will not work for multi accounts
//System.IO.File.WriteAllText("library.json", itemsDebug); //var library_json = "library.json";
//if (System.IO.File.Exists(library_json))
//{
// items = AudibleApi.Common.Converter.FromJson<List<Item>>(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 #endif
await manageEpisodesAsync(api, items); await manageEpisodesAsync(api, items);

View File

@ -5,7 +5,7 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="AudibleApi" Version="1.2.0.1" /> <PackageReference Include="AudibleApi" Version="1.2.1.2" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

View File

@ -13,7 +13,7 @@
<!-- <PublishSingleFile>true</PublishSingleFile> --> <!-- <PublishSingleFile>true</PublishSingleFile> -->
<RuntimeIdentifier>win-x64</RuntimeIdentifier> <RuntimeIdentifier>win-x64</RuntimeIdentifier>
<Version>5.6.6.1</Version> <Version>5.6.7.1</Version>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">

View File

@ -115,13 +115,13 @@ namespace LibationLauncher
return; return;
// path did not result in valid settings // 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}", $"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?", "New install?",
MessageBoxButtons.YesNo, MessageBoxButtons.YesNo,
MessageBoxIcon.Question); MessageBoxIcon.Question);
if (libationFilesDialog.ShowDialog() != DialogResult.Yes) if (continueResult != DialogResult.Yes)
{ {
CancelInstallation(); CancelInstallation();
return; return;