Compare commits

...

3 Commits

Author SHA1 Message Date
Robert McRackan
efca1f9c1d added license debugging 2021-07-26 18:30:13 -04:00
Robert McRackan
ca14db79b9 Found the NRE. Underlying problem persists. Now it will be reported correctly 2021-07-26 17:12:40 -04:00
Robert McRackan
9d00da006c Trim title 2021-07-26 17:11:49 -04:00
4 changed files with 7 additions and 30 deletions

View File

@@ -88,8 +88,8 @@ namespace DataLayer
Category = category;
// simple assigns
Title = title;
Description = description;
Title = title.Trim();
Description = description.Trim();
LengthInMinutes = lengthInMinutes;
// assigns with biz logic

View File

@@ -67,9 +67,6 @@ namespace DtoImporterService
{
var item = importItem.DtoItem;
//Add any subtitle after the title title.
var title = item.Title + (!string.IsNullOrWhiteSpace(item.Subtitle) ? $": {item.Subtitle}" : "");
// absence of authors is very rare, but possible
if (!item.Authors?.Any() ?? true)
item.Authors = new[] { new Person { Name = "", Asin = null } };
@@ -105,7 +102,7 @@ namespace DtoImporterService
var book = DbContext.Books.Add(new Book(
new AudibleProductId(item.ProductId),
title,
item.TitleWithSubtitle,
item.Description,
item.LengthInMinutes,
authors,

View File

@@ -67,35 +67,15 @@ namespace FileLiberator
{
validate(libraryBook);
Serilog.Log.Logger.Debug("Trying to debug mysterious null ref exception {@DebugInfo}", new {
libraryBookIsNull = libraryBook is null,
BookIsNull = libraryBook?.Book is null,
libraryBook?.Book?.Locale,
libraryBook?.Book?.AudibleProductId,
AccountLength = libraryBook?.Account?.Length
});
var api = await InternalUtilities.AudibleApiActions.GetApiAsync(libraryBook.Account, libraryBook.Book.Locale);
Serilog.Log.Logger.Debug("Trying to debug mysterious null ref exception {@DebugInfo}", new { apiIsNull = api is null });
var contentLic = await api.GetDownloadLicenseAsync(libraryBook.Book.AudibleProductId);
Serilog.Log.Logger.Debug("Trying to debug mysterious null ref exception {@DebugInfo}", new {
contentLicIsNull = contentLic is null,
contentMetadataIsNull = contentLic?.ContentMetadata is null,
voucherIsNull = contentLic?.Voucher is null,
keyIsNull = contentLic?.Voucher?.Key is null,
keyLength = contentLic?.Voucher?.Key?.Length,
ivIsNull = contentLic?.Voucher?.Iv is null,
ivLength = contentLic?.Voucher?.Iv?.Length,
});
var aaxcDecryptDlLic = new DownloadLicense
(
contentLic.ContentMetadata?.ContentUrl?.OfflineUrl,
contentLic.Voucher?.Key,
contentLic.Voucher?.Iv,
contentLic?.ContentMetadata?.ContentUrl?.OfflineUrl,
contentLic?.Voucher?.Key,
contentLic?.Voucher?.Iv,
Resources.UserAgent
);

View File

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