Fix Manga ChangeLibrary Endpoint to be faster if library is the same.

Fix MoveMangaLibraryWorker.cs setting off new Library
This commit is contained in:
2025-09-04 22:15:29 +02:00
parent b76f460778
commit f94513a4ae
2 changed files with 5 additions and 2 deletions

View File

@@ -33,7 +33,7 @@ public class MoveMangaLibraryWorker(Manga manga, FileLibrary toLibrary, IEnumera
// Save old Path (to later move chapters)
Dictionary<Chapter, string> oldPath = manga.Chapters.ToDictionary(c => c, c => c.FullArchiveFilePath);
// Set new Path
DbContext.Entry(manga).Property(m => m.Library).CurrentValue = toLibrary;
manga.Library = toLibrary;
if (await DbContext.Sync(CancellationToken) is { success: false })
return [];