From 8efb60652b10ed60d99b63708097185f077379f2 Mon Sep 17 00:00:00 2001 From: Glax Date: Sat, 17 May 2025 23:25:00 +0200 Subject: [PATCH] RetrieveChaptersJob.cs distinct Chapters --- API/Schema/Jobs/RetrieveChaptersJob.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/API/Schema/Jobs/RetrieveChaptersJob.cs b/API/Schema/Jobs/RetrieveChaptersJob.cs index 56ee642..49f6db9 100644 --- a/API/Schema/Jobs/RetrieveChaptersJob.cs +++ b/API/Schema/Jobs/RetrieveChaptersJob.cs @@ -41,7 +41,7 @@ public class RetrieveChaptersJob : Job protected override IEnumerable RunInternal(PgsqlContext context) { // This gets all chapters that are not downloaded - Chapter[] allChapters = Manga.MangaConnector.GetChapters(Manga, Language); + Chapter[] allChapters = Manga.MangaConnector.GetChapters(Manga, Language).DistinctBy(c => c.ChapterId).ToArray(); Chapter[] newChapters = allChapters.Where(chapter => Manga.Chapters.Contains(chapter) == false).ToArray(); Log.Info($"{newChapters.Length} new chapters.");