From c935b990b7979491b03d7b5d861d75a67ad6f3f9 Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Sun, 3 May 2026 18:02:25 -0500 Subject: remove file counts and size --- src/slskd/Transfers/Types/Batch.cs | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/slskd/Transfers/Types/Batch.cs b/src/slskd/Transfers/Types/Batch.cs index ac7025fb..3da583f3 100644 --- a/src/slskd/Transfers/Types/Batch.cs +++ b/src/slskd/Transfers/Types/Batch.cs @@ -76,16 +76,6 @@ public record Batch /// public TransferDirection Direction { get; init; } = TransferDirection.Download; - /// - /// Gets the number of files included in the Batch. - /// - public int FileCount { get; init; } - - /// - /// Gets the sum of the included file's sizes. - /// - public long FileSize { get; init; } - /// /// Gets the time at which the Batch was created. /// @@ -115,6 +105,10 @@ public record Batch but determining whether a Search has been fulfilled, allowing a user to override a download directory, or to handle an event when a batch is completed, we can add them and figure out how persistence should work. + file count and size are also not included because of the transfer deduplication that takes place during + the enqueue; if a batch is created and some or all of the files within are already in progress, they are + dropped and no new transfer records are created. this would create data inconsistency, and for no reason (for now) + loading Transfers and doing aggregation in memory (if fetching 1 batch) or querying and aggregating Transfer records in SQL and then updating a list of Batch records in memory (if fetching a list) technically works, but is unlikely to perform well, especially as data grows, and ESPECIALLY when excliding 'Removed' Batches -- cgit v1.2.3