Compare commits

...

6 Commits

Author SHA1 Message Date
Robert McRackan
2f241806fa version update 2020-07-31 14:32:51 -04:00
Robert McRackan
e417f60a36 When changing locale, clear previous locale specific settings 2020-07-31 14:21:59 -04:00
Robert McRackan
b00f2bd908 Merge branch 'master' of https://github.com/rmcrackan/Libation 2020-07-31 14:05:44 -04:00
Robert McRackan
220cda42e7 Downloader internationalization bug 2020-07-31 14:03:49 -04:00
rmcrackan
f992a7ec64 Update README.md
Add download link to 'getting started'
2020-07-03 18:15:03 -04:00
Robert McRackan
c54c45df33 Bugfix. Audible changed how they handle categories, causing a new bug. Temp fix to get everything working again -- part 2 2020-06-01 21:51:47 -04:00
6 changed files with 32 additions and 7 deletions

View File

@@ -86,8 +86,16 @@ namespace DtoImporterService
.ToList();
// categories are laid out for a breadcrumb. category is 1st, subcategory is 2nd
// absence of categories is very rare, but possible
var lastCategory = item.Categories.LastOrDefault()?.CategoryId ?? "";
// absence of categories is also possible
// CATEGORY HACK: only use the 1st 2 categories
// (real impl: var lastCategory = item.Categories.LastOrDefault()?.CategoryId ?? "";)
var lastCategory
= item.Categories.Length == 0 ? ""
: item.Categories.Length == 1 ? item.Categories[0].CategoryId
// 2+
: item.Categories[1].CategoryId;
var category = DbContext.Categories.Local.SingleOrDefault(c => c.AudibleCategoryId == lastCategory);
var book = DbContext.Books.Add(new Book(

View File

@@ -51,7 +51,7 @@ namespace DtoImporterService
{
for (var i = 0; i < pair.Length; i++)
{
// not yet supported: depth beyond 0 and 1
// CATEGORY HACK: not yet supported: depth beyond 0 and 1
if (i > 1)
break;

View File

@@ -41,7 +41,7 @@ namespace FileLiberator
private async Task<string> downloadBookAsync(LibraryBook libraryBook, string tempAaxFilename)
{
var api = await AudibleApi.EzApiCreator.GetApiAsync(AudibleApiStorage.IdentityTokensFile);
var api = await AudibleApi.EzApiCreator.GetApiAsync(AudibleApiStorage.IdentityTokensFile, null, Configuration.Instance.LocaleCountryCode);
var actualFilePath = await PerformDownloadAsync(
tempAaxFilename,

View File

@@ -13,7 +13,7 @@
<!-- <PublishSingleFile>true</PublishSingleFile> -->
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<Version>3.1.10.1</Version>
<Version>3.1.12.4</Version>
</PropertyGroup>
<ItemGroup>

View File

@@ -77,8 +77,23 @@ namespace LibationWinForms.Dialogs
private void saveBtn_Click(object sender, EventArgs e)
{
config.DecryptKey = this.decryptKeyTb.Text;
config.LocaleCountryCode = this.audibleLocaleCb.Text;
var origLocale = config.LocaleCountryCode;
var newLocale = this.audibleLocaleCb.Text;
if (origLocale == newLocale)
{
config.DecryptKey = this.decryptKeyTb.Text;
}
else
{
// when changing locale:
// - delete decrypt key
// - clear/delete identity tokens file
config.LocaleCountryCode = newLocale;
config.DecryptKey = "";
File.Delete(AudibleApiStorage.IdentityTokensFile);
}
config.DownloadsInProgressEnum = downloadsInProgressLibationFilesRb.Checked ? "LibationFiles" : "WinTemp";
config.DecryptInProgressEnum = decryptInProgressLibationFilesRb.Checked ? "LibationFiles" : "WinTemp";

View File

@@ -55,6 +55,8 @@ I made this for myself and I want to share it with the great programming and aud
## Getting started
#### [Download Libation](https://github.com/rmcrackan/Libation/releases)
### Import your library
Select Import > Scan Library: