Skip to content

Commit

Permalink
Fix duplicate job check.
Browse files Browse the repository at this point in the history
We were still adding duplicate jobs if not *every* field in the Manga matched.
We now only compare publicationId.
  • Loading branch information
C9Glax committed Dec 12, 2024
1 parent 747df0b commit 025d43b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Tranga/Jobs/DownloadNewChapters.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,6 @@ public override bool Equals(object? obj)
if (obj is not DownloadNewChapters otherJob)
return false;
return otherJob.mangaConnector == this.mangaConnector &&
otherJob.manga.Equals(this.manga);
otherJob.manga.publicationId == this.manga.publicationId;
}
}
2 changes: 1 addition & 1 deletion Tranga/Jobs/UpdateMetadata.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,6 @@ public override bool Equals(object? obj)
if (obj is not UpdateMetadata otherJob)
return false;
return otherJob.mangaConnector == this.mangaConnector &&
otherJob.manga.Equals(this.manga);
otherJob.manga.publicationId == this.manga.publicationId;
}
}

0 comments on commit 025d43b

Please sign in to comment.