mirror of
https://github.com/rmcrackan/Libation.git
synced 2026-11-30 18:12:38 +01:00
Show a dialog when Audible throttles a download license.
CustomerThrottled was treated as a generic License Denied, so non-Plus titles got no explanation. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -814,15 +814,20 @@ public class ProcessQueueViewModel : ReactiveObject
|
||||
await book.LibraryBook.UpdateBookStatusAsync(LiberatedStatus.Error);
|
||||
}
|
||||
else if (result == ProcessBookResult.LicenseDeniedPossibleOutage
|
||||
|| result == ProcessBookResult.LicenseDeniedThrottled
|
||||
|| (result == ProcessBookResult.LicenseDenied && book.LibraryBook.IsAudiblePlus))
|
||||
{
|
||||
bool show;
|
||||
lock (resultLock) { show = !shownLicenseGuidanceMessage; shownLicenseGuidanceMessage = true; }
|
||||
if (show)
|
||||
{
|
||||
var body = result == ProcessBookResult.LicenseDeniedPossibleOutage
|
||||
? ContentLicenseDeniedUserMessage.BuildDialogBodyForPossibleOutage(book.LibraryBook.Book.TitleWithSubtitle)
|
||||
: ContentLicenseDeniedUserMessage.BuildDialogBodyForPlusCatalog(book.LibraryBook.Book.TitleWithSubtitle);
|
||||
var title = book.LibraryBook.Book.TitleWithSubtitle;
|
||||
var body = result switch
|
||||
{
|
||||
ProcessBookResult.LicenseDeniedPossibleOutage => ContentLicenseDeniedUserMessage.BuildDialogBodyForPossibleOutage(title),
|
||||
ProcessBookResult.LicenseDeniedThrottled => ContentLicenseDeniedUserMessage.BuildDialogBodyForThrottling(title),
|
||||
_ => ContentLicenseDeniedUserMessage.BuildDialogBodyForPlusCatalog(title)
|
||||
};
|
||||
await MessageBoxBase.Show(
|
||||
body,
|
||||
ContentLicenseDeniedUserMessage.DialogCaption,
|
||||
|
||||
Reference in New Issue
Block a user