mirror of
https://github.com/C9Glax/tranga.git
synced 2025-07-04 01:44:17 +02:00
Fixes #97 missing jobs.
Implemented Equals(obj) functions for Chapter, DownloadChapter and DownloadNewChapters to check if jobs already exist.
This commit is contained in:
@ -43,15 +43,7 @@ public class JobBoss : GlobalBase
|
||||
/// </summary>
|
||||
public bool ContainsJobLike(Job job)
|
||||
{
|
||||
if (job is DownloadChapter dcJob)
|
||||
{
|
||||
return this.GetJobsLike(dcJob.mangaConnector, chapter: dcJob.chapter).Any();
|
||||
}else if (job is DownloadNewChapters ncJob)
|
||||
{
|
||||
return this.GetJobsLike(ncJob.mangaConnector, ncJob.manga).Any();
|
||||
}
|
||||
|
||||
return false;
|
||||
return this.jobs.Any(existingJob => existingJob.Equals(job));
|
||||
}
|
||||
|
||||
public void RemoveJob(Job job)
|
||||
|
Reference in New Issue
Block a user