2
0

Cleanup MangaCache

This commit is contained in:
Glax 2024-08-10 21:42:09 +02:00
parent 1ee9b644aa
commit 6520aebcdf

View File

@ -195,6 +195,9 @@ public class JobBoss : GlobalBase
string[] coverFiles = Directory.GetFiles(settings.coverImageCache);
foreach(string fileName in coverFiles.Where(fileName => !GetAllCachedManga().Any(manga => manga.coverFileNameInCache == fileName)))
File.Delete(fileName);
string[] mangaFiles = Directory.GetFiles(settings.mangaCacheFolderPath);
foreach(string fileName in mangaFiles.Where(fileName => !GetAllCachedManga().Any(manga => fileName.Split('.')[0] == manga.internalId)))
File.Delete(fileName);
}
internal void UpdateJobFile(Job job, string? oldFile = null)