mirror of
https://github.com/C9Glax/tranga.git
synced 2025-01-12 03:17:33 +01:00
Only send notifications if more than 0 new chapters
This commit is contained in:
parent
b099da1156
commit
e70a14ca56
@ -86,8 +86,9 @@ public abstract class TrangaTask
|
|||||||
{
|
{
|
||||||
case Task.MonitorPublication:
|
case Task.MonitorPublication:
|
||||||
MonitorPublicationTask mpt = (MonitorPublicationTask)this;
|
MonitorPublicationTask mpt = (MonitorPublicationTask)this;
|
||||||
nm.SendNotification("Downloaded new chapters",
|
int successfulCount = this.childTasks.Count(ct => ct.state is ExecutionState.Success);
|
||||||
$"{mpt.publication.sortName}: {this.childTasks.Count(ct => ct.state is ExecutionState.Success)} new chapters.");
|
if(successfulCount > 0)
|
||||||
|
nm.SendNotification("Downloaded new chapters", $"{mpt.publication.sortName}: {successfulCount} new chapters.");
|
||||||
break;
|
break;
|
||||||
case Task.DownloadChapter:
|
case Task.DownloadChapter:
|
||||||
DownloadChapterTask dct = (DownloadChapterTask)this;
|
DownloadChapterTask dct = (DownloadChapterTask)this;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user