diff --git a/Source/ApplicationServices/LibraryCommands.cs b/Source/ApplicationServices/LibraryCommands.cs index 60e55c94..1c101306 100644 --- a/Source/ApplicationServices/LibraryCommands.cs +++ b/Source/ApplicationServices/LibraryCommands.cs @@ -213,12 +213,13 @@ namespace ApplicationServices if (archiver is not null) { var fileName = $"{DateTime.Now:u} {account.MaskedLogEntry}.json"; + var items = await Task.Run(() => JArray.FromObject(dtoItems.Select(i => i.SourceJson))); var scanFile = new JObject { { "Account", account.MaskedLogEntry }, { "ScannedDateTime", DateTime.Now.ToString("u") }, - { "Items", await Task.Run(() => JArray.FromObject(dtoItems.Select(i => i.SourceJson))) } + { "Items", items} }; await archiver.AddFileAsync(fileName, scanFile); diff --git a/Source/DtoImporterService/LibraryBookImporter.cs b/Source/DtoImporterService/LibraryBookImporter.cs index 727fed16..411c3885 100644 --- a/Source/DtoImporterService/LibraryBookImporter.cs +++ b/Source/DtoImporterService/LibraryBookImporter.cs @@ -91,29 +91,8 @@ namespace DtoImporterService return qtyNew; } - /* - * Subscription Plan Names: - * - * US: "SpecialBenefit" - * IT: "Rodizio" - * - * Audible Plus Plan Names: - * - * US: "US Minerva" - * IT: "Audible-AYCL" - * - */ - - - //This SEEMS to work to detect plus titles which are no longer available. - //I have my doubts it won't yield false negatives, but I have more - //confidence that it won't yield many/any false positives. private static bool isPlusTitleUnavailable(ImportItem item) => item.DtoItem.IsAyce is true - && item.DtoItem.Plans?.Any(p => - p.PlanName.ContainsInsensitive("Minerva") || - p.PlanName.ContainsInsensitive("AYCL") || - p.PlanName.ContainsInsensitive("Free") - ) is not true; + && item.DtoItem.Plans?.Any(p => p.IsAyce) is not true; } }