diff options
| author | JP Dillingham <jp@dillingham.me> | 2026-05-03 18:02:25 -0500 |
|---|---|---|
| committer | JP Dillingham <jp@dillingham.me> | 2026-05-03 18:02:25 -0500 |
| commit | c935b990b7979491b03d7b5d861d75a67ad6f3f9 (patch) | |
| tree | 3cc0d815e40ee233f8cd1e31ef9576aa292ec9fc /src | |
| parent | 0e20169d0b9b65f247d5197a243e4fb22cb112d7 (diff) | |
| download | slskd-c935b990b7979491b03d7b5d861d75a67ad6f3f9.tar.gz | |
remove file counts and size
Diffstat (limited to 'src')
| -rw-r--r-- | src/slskd/Transfers/Types/Batch.cs | 14 |
1 files changed, 4 insertions, 10 deletions
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 @@ -77,16 +77,6 @@ public record Batch public TransferDirection Direction { get; init; } = TransferDirection.Download; /// <summary> - /// Gets the number of files included in the Batch. - /// </summary> - public int FileCount { get; init; } - - /// <summary> - /// Gets the sum of the included file's sizes. - /// </summary> - public long FileSize { get; init; } - - /// <summary> /// Gets the time at which the Batch was created. /// </summary> public DateTime CreatedAt { get; init; } = DateTime.UtcNow; @@ -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 |
