Add try block

This commit is contained in:
Michael Bucari-Tovo 2022-05-08 19:58:48 -06:00
parent 9a619186fd
commit 4e587e0429

View File

@ -82,12 +82,18 @@ namespace LibationWinForms
public async Task DownloadBook() public async Task DownloadBook()
{ {
if (!DownloadInProgress) if (!DownloadInProgress)
{
try
{ {
DownloadInProgress = true; DownloadInProgress = true;
await BookLiberation.ProcessorAutomationController.BackupSingleBookAsync(LibraryBook); await BookLiberation.ProcessorAutomationController.BackupSingleBookAsync(LibraryBook);
}
finally
{
DownloadInProgress = false; DownloadInProgress = false;
} }
} }
}
public void UpdateLibraryBook(LibraryBook libraryBook) public void UpdateLibraryBook(LibraryBook libraryBook)
{ {