Fix RetrieveChaptersJob

This commit is contained in:
Glax 2025-04-02 02:09:05 +02:00
parent 31beeeffae
commit f085c5cf8e
2 changed files with 3 additions and 3 deletions

View File

@ -17,7 +17,7 @@ public class RetrieveChaptersJob(ulong recurrenceMs, string mangaId, string? par
protected override IEnumerable<Job> RunInternal(PgsqlContext context)
{
Manga? manga = Manga ?? context.Mangas.Find(MangaId);
Manga? manga = context.Mangas.Find(MangaId) ?? Manga;
if (manga is null)
{
Log.Error("Manga is null.");

View File

@ -240,7 +240,7 @@ public class MangaDex : MangaConnector
try
{
Chapter newChapter = new Chapter(manga, url, chapterNumber, volume, title);
Chapter newChapter = new(manga, url, chapterNumber, volume, title);
if(!chapters.Contains(newChapter))
chapters.Add(newChapter);
}
@ -251,7 +251,7 @@ public class MangaDex : MangaConnector
}
//Return Chapters ordered by Chapter-Number
return chapters.Order().ToArray();
return chapters.ToArray();
}
internal override string[] GetChapterImageUrls(Chapter chapter)