Fix file creation for CleanupMangaconnectorIdsWithoutConnector.cs

This commit is contained in:
2025-09-18 02:11:55 +02:00
parent 4ea207520b
commit 052e6b33bb

View File

@@ -14,9 +14,7 @@ public class CleanupMangaconnectorIdsWithoutConnector : BaseWorkerWithContext<Ma
Log.Info($"Deleted {deletedChapterIds} chapterIds.");
// Manga without Connector get printed to file, to not lose data...
if (await DbContext.MangaConnectorToManga.Include(id => id.Obj)
.Where(mcId => connectorNames.Any(name => name == mcId.MangaConnectorName)).ToListAsync() is
{ Count: > 0 } list)
if (await DbContext.MangaConnectorToManga.Include(id => id.Obj) .Where(mcId => connectorNames.All(name => name != mcId.MangaConnectorName)).ToListAsync() is { Count: > 0 } list)
{
string filePath = Path.Join(TrangaSettings.WorkingDirectory, $"deletedManga-{DateTime.UtcNow.Ticks}.txt");
Log.Debug($"Writing deleted manga to {filePath}.");