mirror of
https://github.com/C9Glax/tranga.git
synced 2025-05-21 13:43:01 +02:00
RetrieveChaptersJob.cs distinct Chapters
This commit is contained in:
parent
fe60b98cb8
commit
8efb60652b
@ -41,7 +41,7 @@ public class RetrieveChaptersJob : Job
|
||||
protected override IEnumerable<Job> 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.");
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user