Fix Chapter already exists check

This commit is contained in:
2025-09-05 00:05:14 +02:00
parent aae5c88ec9
commit ee3789fdfd
4 changed files with 35 additions and 5 deletions

View File

@@ -35,6 +35,14 @@ public class DownloadChapterFromMangaconnectorWorker(MangaConnectorId<Chapter> c
Log.Error("Could not get MangaConnectorId.");
return []; //TODO Exception?
}
// Check if Chapter already exists...
if (await mangaConnectorId.Obj.CheckDownloaded(DbContext, CancellationToken))
{
Log.Warn("Chapter already exists!");
return [];
}
if (!Tranga.TryGetMangaConnector(mangaConnectorId.MangaConnectorName, out MangaConnector? mangaConnector))
{
Log.Error("Could not get MangaConnector.");