Merge branch 'rmcrackan:master' into master
This commit is contained in:
commit
41c4b12ae1
21 changed files with 207 additions and 1113 deletions
|
|
@ -46,7 +46,6 @@ namespace LibationWinForms
|
|||
}
|
||||
}
|
||||
|
||||
public bool DownloadInProgress { get; private set; }
|
||||
public string ProductRating { get; private set; }
|
||||
public string PurchaseDate { get; private set; }
|
||||
public string MyRating { get; private set; }
|
||||
|
|
@ -68,7 +67,8 @@ namespace LibationWinForms
|
|||
//Cache these statuses for faster sorting.
|
||||
if ((DateTime.Now - lastStatusUpdate).TotalSeconds > 2)
|
||||
{
|
||||
UpdateLiberatedStatus(notify: false);
|
||||
_bookStatus = LibraryCommands.Liberated_Status(LibraryBook.Book);
|
||||
_pdfStatus = LibraryCommands.Pdf_Status(LibraryBook.Book);
|
||||
lastStatusUpdate = DateTime.Now;
|
||||
}
|
||||
return (_bookStatus, _pdfStatus);
|
||||
|
|
@ -84,23 +84,6 @@ namespace LibationWinForms
|
|||
|
||||
public GridEntry(LibraryBook libraryBook) => setLibraryBook(libraryBook);
|
||||
|
||||
public async Task DownloadBook()
|
||||
{
|
||||
if (DownloadInProgress)
|
||||
return;
|
||||
|
||||
try
|
||||
{
|
||||
DownloadInProgress = true;
|
||||
await BookLiberation.ProcessorAutomationController.BackupSingleBookAsync(LibraryBook);
|
||||
UpdateLiberatedStatus();
|
||||
}
|
||||
finally
|
||||
{
|
||||
DownloadInProgress = false;
|
||||
}
|
||||
}
|
||||
|
||||
public void UpdateLibraryBook(LibraryBook libraryBook)
|
||||
{
|
||||
if (AudibleProductId != libraryBook.Book.AudibleProductId)
|
||||
|
|
@ -209,14 +192,6 @@ namespace LibationWinForms
|
|||
Committed?.Invoke(this, null);
|
||||
}
|
||||
|
||||
private void UpdateLiberatedStatus(bool notify = true)
|
||||
{
|
||||
_bookStatus = LibraryCommands.Liberated_Status(LibraryBook.Book);
|
||||
_pdfStatus = LibraryCommands.Pdf_Status(LibraryBook.Book);
|
||||
if (notify)
|
||||
NotifyPropertyChanged(nameof(Liberate));
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Data Sorting
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue