Only remove a LibraryBook from queue if we are trying to re-download.
This commit is contained in:
parent
944645379e
commit
9f8075041b
@ -41,21 +41,25 @@ namespace LibationAvalonia.ViewModels
|
||||
{
|
||||
var item = libraryBooks[0];
|
||||
|
||||
//Remove this item from the queue if it's already present and completed.
|
||||
//Only do this when adding a single book at a time to prevent accidental
|
||||
//extra downloads when queueing in batches.
|
||||
ProcessQueue.RemoveCompleted(item);
|
||||
void initiateSingleDownload()
|
||||
{
|
||||
//Remove this item from the queue if it's already present and completed.
|
||||
//Only do this when adding a single book at a time to prevent accidental
|
||||
//extra downloads when queueing in batches.
|
||||
ProcessQueue.RemoveCompleted(item);
|
||||
setQueueCollapseState(false);
|
||||
}
|
||||
|
||||
if (item.Book.UserDefinedItem.BookStatus is LiberatedStatus.NotLiberated or LiberatedStatus.PartialDownload)
|
||||
{
|
||||
initiateSingleDownload();
|
||||
Serilog.Log.Logger.Information("Begin single book backup of {libraryBook}", item);
|
||||
setQueueCollapseState(false);
|
||||
ProcessQueue.AddDownloadDecrypt(item);
|
||||
}
|
||||
else if (item.Book.UserDefinedItem.PdfStatus is LiberatedStatus.NotLiberated)
|
||||
{
|
||||
initiateSingleDownload();
|
||||
Serilog.Log.Logger.Information("Begin single pdf backup of {libraryBook}", item);
|
||||
setQueueCollapseState(false);
|
||||
ProcessQueue.AddDownloadPdf(item);
|
||||
}
|
||||
else if (item.Book.Audio_Exists())
|
||||
|
||||
@ -31,21 +31,25 @@ namespace LibationWinForms
|
||||
{
|
||||
var item = libraryBooks[0];
|
||||
|
||||
//Remove this item from the queue if it's already present and completed.
|
||||
//Only do this when adding a single book at a time to prevent accidental
|
||||
//extra downloads when queueing in batches.
|
||||
processBookQueue1.RemoveCompleted(item);
|
||||
void initiateSingleDownload()
|
||||
{
|
||||
//Remove this item from the queue if it's already present and completed.
|
||||
//Only do this when adding a single book at a time to prevent accidental
|
||||
//extra downloads when queueing in batches.
|
||||
processBookQueue1.RemoveCompleted(item);
|
||||
SetQueueCollapseState(false);
|
||||
}
|
||||
|
||||
if (item.Book.UserDefinedItem.BookStatus is LiberatedStatus.NotLiberated or LiberatedStatus.PartialDownload)
|
||||
{
|
||||
initiateSingleDownload();
|
||||
Serilog.Log.Logger.Information("Begin single book backup of {libraryBook}", item);
|
||||
SetQueueCollapseState(false);
|
||||
processBookQueue1.AddDownloadDecrypt(item);
|
||||
}
|
||||
else if (item.Book.UserDefinedItem.PdfStatus is LiberatedStatus.NotLiberated)
|
||||
{
|
||||
initiateSingleDownload();
|
||||
Serilog.Log.Logger.Information("Begin single pdf backup of {libraryBook}", item);
|
||||
SetQueueCollapseState(false);
|
||||
processBookQueue1.AddDownloadPdf(item);
|
||||
}
|
||||
else if (item.Book.Audio_Exists())
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user