Also delete downloadChapterTask when delete download new chapter tasks
This commit is contained in:
parent
e14683d21a
commit
437136804d
@ -223,10 +223,16 @@ public class TaskManager
|
|||||||
if (connectorName is null || publicationId is null)
|
if (connectorName is null || publicationId is null)
|
||||||
logger?.WriteLine(this.GetType().ToString(), "connectorName and publication can not be null");
|
logger?.WriteLine(this.GetType().ToString(), "connectorName and publication can not be null");
|
||||||
else
|
else
|
||||||
|
{
|
||||||
_allTasks.RemoveWhere(mTask =>
|
_allTasks.RemoveWhere(mTask =>
|
||||||
mTask.GetType() == typeof(DownloadNewChaptersTask) &&
|
mTask.GetType() == typeof(DownloadNewChaptersTask) &&
|
||||||
((DownloadNewChaptersTask)mTask).publication.internalId == publicationId &&
|
((DownloadNewChaptersTask)mTask).publication.internalId == publicationId &&
|
||||||
((DownloadNewChaptersTask)mTask).connectorName == connectorName!);
|
((DownloadNewChaptersTask)mTask).connectorName == connectorName!);
|
||||||
|
_allTasks.RemoveWhere(mTask =>
|
||||||
|
mTask.GetType() == typeof(DownloadChapterTask) &&
|
||||||
|
((DownloadChapterTask)mTask).publication.internalId == publicationId &&
|
||||||
|
((DownloadChapterTask)mTask).connectorName == connectorName!);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
ExportDataAndSettings();
|
ExportDataAndSettings();
|
||||||
|
Loading…
Reference in New Issue
Block a user