E4: «Salva il fotogramma» ripreso dopo una pausa non salva più l'istante vecchio
Il lavoro registrava lo SHA-256 del file nuovo prima di scriverlo: se il disco se ne andava a metà, alla ripresa il file sembrava non cambiato e si salvava l'istante scelto sul file di prima. L'elemento tiene lo SHA-256 sul quale il suo istante è stato scelto. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
cf52e0ea6a
commit
9c2d237ec9
2 files changed
+76
-17
No files matched your search
@@ -591,7 +591,13 @@ public sealed class ExportCopier(ExportEnvironment env)
|
||||
chosen = at;
|
||||
}
|
||||
|
||||
batch = batch.Select(i => string.Equals(i.SourceSha256, sha, StringComparison.Ordinal) ? i : i with { SourceSha256 = sha }).ToList();
|
||||
if (mode != FrameMode.Still)
|
||||
{
|
||||
// A «Still» item keeps the SHA-256 its instant was chosen on: a job that pauses once the item is written again
|
||||
// (the disk went in the middle of the file) must still see that the file changed.
|
||||
batch = batch.Select(i => string.Equals(i.SourceSha256, sha, StringComparison.Ordinal) ? i : i with { SourceSha256 = sha }).ToList();
|
||||
}
|
||||
|
||||
var format = batch[0].Format;
|
||||
var firstId = mode == FrameMode.Count
|
||||
? await exports.FirstItemIdAsync(x.Run.Id, library.Media.Id, ExportVariant.Frame, format, ct).ConfigureAwait(false) ?? batch[0].Id
|
||||
|
||||
Reference in new issue
Block a user