fix file cache manager issues

This commit is contained in:
Stanley Dimant
2022-06-24 18:24:30 +02:00
parent 9b8145fddd
commit cc0af38b31
3 changed files with 63 additions and 29 deletions

View File

@@ -133,6 +133,17 @@ namespace MareSynchronos.WebAPI
downloadedHashes.Add(hash);
}
bool allFilesInDb = false;
while (!allFilesInDb)
{
await using (var db = new FileCacheContext())
{
allFilesInDb = downloadedHashes.All(h => db.FileCaches.Any(f => f.Hash == h));
}
await Task.Delay(250);
}
CurrentDownloads.Clear();
}