Fixed wrong comparison on add new task
This commit is contained in:
parent
cf6fc3b8f6
commit
5099e25f3f
@ -152,9 +152,9 @@ public class TaskManager
|
|||||||
case TrangaTask.Task.DownloadNewChapters:
|
case TrangaTask.Task.DownloadNewChapters:
|
||||||
IEnumerable<TrangaTask> matchingdnc =
|
IEnumerable<TrangaTask> matchingdnc =
|
||||||
_allTasks.Where(mTask => mTask.GetType() == typeof(DownloadNewChaptersTask));
|
_allTasks.Where(mTask => mTask.GetType() == typeof(DownloadNewChaptersTask));
|
||||||
if (matchingdnc.All(mTask =>
|
if (!matchingdnc.Any(mTask =>
|
||||||
((DownloadNewChaptersTask)mTask).publication.internalId != ((DownloadNewChaptersTask)newTask).publication.publicationId &&
|
((DownloadNewChaptersTask)mTask).publication.internalId == ((DownloadNewChaptersTask)newTask).publication.internalId &&
|
||||||
((DownloadNewChaptersTask)mTask).connectorName != ((DownloadNewChaptersTask)newTask).connectorName))
|
((DownloadNewChaptersTask)mTask).connectorName == ((DownloadNewChaptersTask)newTask).connectorName))
|
||||||
_allTasks.Add(newTask);
|
_allTasks.Add(newTask);
|
||||||
else
|
else
|
||||||
logger?.WriteLine(this.GetType().ToString(), $"Task already exists {newTask}");
|
logger?.WriteLine(this.GetType().ToString(), $"Task already exists {newTask}");
|
||||||
|
Loading…
Reference in New Issue
Block a user