From 025d43b75202496e600a2eb35bc48ad85bcfc723 Mon Sep 17 00:00:00 2001 From: Glax Date: Thu, 12 Dec 2024 22:18:06 +0100 Subject: [PATCH] Fix duplicate job check. We were still adding duplicate jobs if not *every* field in the Manga matched. We now only compare publicationId. --- Tranga/Jobs/DownloadNewChapters.cs | 2 +- Tranga/Jobs/UpdateMetadata.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Tranga/Jobs/DownloadNewChapters.cs b/Tranga/Jobs/DownloadNewChapters.cs index 29c3e60..b07d46b 100644 --- a/Tranga/Jobs/DownloadNewChapters.cs +++ b/Tranga/Jobs/DownloadNewChapters.cs @@ -54,6 +54,6 @@ public class DownloadNewChapters : Job if (obj is not DownloadNewChapters otherJob) return false; return otherJob.mangaConnector == this.mangaConnector && - otherJob.manga.Equals(this.manga); + otherJob.manga.publicationId == this.manga.publicationId; } } \ No newline at end of file diff --git a/Tranga/Jobs/UpdateMetadata.cs b/Tranga/Jobs/UpdateMetadata.cs index 72b5a60..ac8bdd6 100644 --- a/Tranga/Jobs/UpdateMetadata.cs +++ b/Tranga/Jobs/UpdateMetadata.cs @@ -71,6 +71,6 @@ public class UpdateMetadata : Job if (obj is not UpdateMetadata otherJob) return false; return otherJob.mangaConnector == this.mangaConnector && - otherJob.manga.Equals(this.manga); + otherJob.manga.publicationId == this.manga.publicationId; } } \ No newline at end of file