Add Pair Character Analysis for funsies
This commit is contained in:
@@ -322,7 +322,7 @@ public partial class FileDownloadManager : DisposableMediatorSubscriberBase
|
||||
var filePath = _fileDbManager.GetCacheFilePath(fileHash, fileExtension);
|
||||
await _fileCompactor.WriteAllBytesAsync(filePath, decompressedFile.ToArray(), token).ConfigureAwait(false);
|
||||
|
||||
PersistFileToStorage(fileHash, filePath);
|
||||
PersistFileToStorage(fileHash, filePath, fileLengthBytes);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
@@ -355,7 +355,7 @@ public partial class FileDownloadManager : DisposableMediatorSubscriberBase
|
||||
return await response.Content.ReadFromJsonAsync<List<DownloadFileDto>>(cancellationToken: ct).ConfigureAwait(false) ?? [];
|
||||
}
|
||||
|
||||
private void PersistFileToStorage(string fileHash, string filePath)
|
||||
private void PersistFileToStorage(string fileHash, string filePath, long? compressedSize = null)
|
||||
{
|
||||
var fi = new FileInfo(filePath);
|
||||
Func<DateTime> RandomDayInThePast()
|
||||
@@ -378,6 +378,8 @@ public partial class FileDownloadManager : DisposableMediatorSubscriberBase
|
||||
File.Delete(filePath);
|
||||
_fileDbManager.RemoveHashedFile(entry.Hash, entry.PrefixedFilePath);
|
||||
}
|
||||
if (entry != null)
|
||||
entry.CompressedSize = compressedSize;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
@@ -245,6 +245,8 @@ public sealed class FileUploadManager : DisposableMediatorSubscriberBase
|
||||
|
||||
var compressedSize = CurrentUploads.Sum(c => c.Total);
|
||||
Logger.LogDebug("Upload complete, compressed {size} to {compressed}", UiSharedService.ByteToString(totalSize), UiSharedService.ByteToString(compressedSize));
|
||||
|
||||
_fileDbManager.WriteOutFullCsv();
|
||||
}
|
||||
|
||||
foreach (var file in unverifiedUploadHashes.Where(c => !CurrentUploads.Exists(u => string.Equals(u.Hash, c, StringComparison.Ordinal))))
|
||||
|
||||
Reference in New Issue
Block a user