Merge branch 'fix/ingest-upload': uploads into API-made sequences, damaged frames repaired, positions follow inserts, cardEvent
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
This commit is contained in:
29 files changed
+1546
-80
No files matched your search
@@ -40,7 +40,8 @@ public interface IUploadEngine : INotifyPropertyChanged
|
||||
|
||||
/// <summary>
|
||||
/// Works through the <see cref="UploadQueue"/> with <see cref="Parallelism"/> concurrent files: hash, upload
|
||||
/// (resumable chunks; the server verifies the SHA-256), then optionally delete the source the server confirmed.
|
||||
/// (resumable chunks; the server verifies the SHA-256), then optionally delete the source whose bytes the server
|
||||
/// received and verified. A file the server already held is kept: no copy of it was verified on this run.
|
||||
/// Lives on the UI thread: state changes happen there while hashing and HTTP run on the thread pool.
|
||||
/// </summary>
|
||||
public sealed class UploadEngine : IUploadEngine, IDisposable
|
||||
@@ -221,7 +222,7 @@ public sealed class UploadEngine : IUploadEngine, IDisposable
|
||||
item.State = outcome == UploadOutcome.Verified ? UploadItemState.Verified : UploadItemState.Skipped;
|
||||
_queue.OnChanged();
|
||||
ItemConfirmed?.Invoke(this, item);
|
||||
if (_deleteAfterUpload()) DeleteConfirmedSource(item);
|
||||
if (outcome == UploadOutcome.Verified && _deleteAfterUpload()) DeleteConfirmedSource(item);
|
||||
}
|
||||
catch (OperationCanceledException) when (ct.IsCancellationRequested)
|
||||
{
|
||||
@@ -312,8 +313,8 @@ public sealed class UploadEngine : IUploadEngine, IDisposable
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// BRIEF §0.2 rule 8: deletes only a file the server confirmed by hash, and only when it is still exactly the
|
||||
/// bytes that were hashed (same size and write time).
|
||||
/// BRIEF §0.2 rule 8: deletes only a file whose bytes the server received and verified by hash before committing
|
||||
/// them, and only when it is still exactly the bytes that were hashed (same size and write time).
|
||||
/// </summary>
|
||||
private static void DeleteConfirmedSource(UploadItem item)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user