Enable auto-downloading (#636)
This commit is contained in:
parent
ca0e639a19
commit
a5d98364fa
@ -1,5 +1,6 @@
|
|||||||
using ApplicationServices;
|
using ApplicationServices;
|
||||||
using Avalonia.Threading;
|
using Avalonia.Threading;
|
||||||
|
using LibationFileManager;
|
||||||
using ReactiveUI;
|
using ReactiveUI;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
@ -52,6 +53,10 @@ namespace LibationAvalonia.ViewModels
|
|||||||
updateCountsTask = Task.Run(() => LibraryCommands.GetCounts());
|
updateCountsTask = Task.Run(() => LibraryCommands.GetCounts());
|
||||||
var stats = await updateCountsTask;
|
var stats = await updateCountsTask;
|
||||||
await Dispatcher.UIThread.InvokeAsync(() => LibraryStats = stats);
|
await Dispatcher.UIThread.InvokeAsync(() => LibraryStats = stats);
|
||||||
|
|
||||||
|
if (Configuration.Instance.AutoDownloadEpisodes
|
||||||
|
&& stats.booksNoProgress + stats.pdfsNotDownloaded > 0)
|
||||||
|
await Dispatcher.UIThread.InvokeAsync(BackupAllBooks);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user