Removed obselete functions, changed download bars a bit. renamed files correctly

This commit is contained in:
cake
2025-11-30 08:09:58 +01:00
parent cab13874d8
commit a9181d2592
24 changed files with 357 additions and 197 deletions

View File

@@ -636,8 +636,7 @@ public sealed class FileCacheManager : IHostedService
private FileCacheEntity? CreateFileCacheEntity(FileInfo fileInfo, string prefixedPath, string? hash = null)
{
var algo = Crypto.DetectAlgo(Path.GetFileNameWithoutExtension(fileInfo.Name));
hash ??= Crypto.ComputeFileHash(fileInfo.FullName, algo);
hash ??= Crypto.ComputeFileHash(fileInfo.FullName, Crypto.HashAlgo.Sha1);
var entity = new FileCacheEntity(hash, prefixedPath, fileInfo.LastWriteTimeUtc.Ticks.ToString(CultureInfo.InvariantCulture), fileInfo.Length);
entity = ReplacePathPrefixes(entity);
AddHashedFile(entity);