Use new AudibleApi methods
This commit is contained in:
parent
1149c10cf1
commit
defabf7356
@ -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);
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user