Use new AudibleApi methods
This commit is contained in:
parent
1149c10cf1
commit
defabf7356
@ -213,12 +213,13 @@ namespace ApplicationServices
|
|||||||
if (archiver is not null)
|
if (archiver is not null)
|
||||||
{
|
{
|
||||||
var fileName = $"{DateTime.Now:u} {account.MaskedLogEntry}.json";
|
var fileName = $"{DateTime.Now:u} {account.MaskedLogEntry}.json";
|
||||||
|
var items = await Task.Run(() => JArray.FromObject(dtoItems.Select(i => i.SourceJson)));
|
||||||
|
|
||||||
var scanFile = new JObject
|
var scanFile = new JObject
|
||||||
{
|
{
|
||||||
{ "Account", account.MaskedLogEntry },
|
{ "Account", account.MaskedLogEntry },
|
||||||
{ "ScannedDateTime", DateTime.Now.ToString("u") },
|
{ "ScannedDateTime", DateTime.Now.ToString("u") },
|
||||||
{ "Items", await Task.Run(() => JArray.FromObject(dtoItems.Select(i => i.SourceJson))) }
|
{ "Items", items}
|
||||||
};
|
};
|
||||||
|
|
||||||
await archiver.AddFileAsync(fileName, scanFile);
|
await archiver.AddFileAsync(fileName, scanFile);
|
||||||
|
|||||||
@ -91,29 +91,8 @@ namespace DtoImporterService
|
|||||||
return qtyNew;
|
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)
|
private static bool isPlusTitleUnavailable(ImportItem item)
|
||||||
=> item.DtoItem.IsAyce is true
|
=> item.DtoItem.IsAyce is true
|
||||||
&& item.DtoItem.Plans?.Any(p =>
|
&& item.DtoItem.Plans?.Any(p => p.IsAyce) is not true;
|
||||||
p.PlanName.ContainsInsensitive("Minerva") ||
|
|
||||||
p.PlanName.ContainsInsensitive("AYCL") ||
|
|
||||||
p.PlanName.ContainsInsensitive("Free")
|
|
||||||
) is not true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user