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.");