Merge branch 'refs/heads/cuttingedge-merge-ServerV2' into cuttingedge
This commit is contained in:
commit
6ca8d58e43
@ -180,13 +180,10 @@ public class JobBoss : GlobalBase
|
|||||||
AddMangaToCache(dncJob.manga);
|
AddMangaToCache(dncJob.manga);
|
||||||
}
|
}
|
||||||
|
|
||||||
HashSet<string> coverFileNames = GetAllCachedManga().Select(manga => manga.coverFileNameInCache!).ToHashSet();
|
string[] coverFiles = Directory.GetFiles(settings.coverImageCache);
|
||||||
foreach (string fileName in Directory.GetFiles(settings.coverImageCache)) //Cleanup Unused Covers
|
foreach(string fileName in coverFiles.Where(fileName => !GetAllCachedManga().Any(manga => manga.coverFileNameInCache == fileName)))
|
||||||
{
|
|
||||||
if(!coverFileNames.Any(existingManga => fileName.Contains(existingManga)))
|
|
||||||
File.Delete(fileName);
|
File.Delete(fileName);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
internal void UpdateJobFile(Job job, string? oldFile = null)
|
internal void UpdateJobFile(Job job, string? oldFile = null)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user