- ArchiveImages.IsProxyOf compares capture times to the microsecond the index
keeps (sidecars and Exif keep 100 ns ticks), and for frames read through
proxies also applies the policy's size rule, so the proxy pass, uploads,
thumbnails, renders, analyses, tiers, manifests and downloads agree.
- Proxy headers are cached per file while length and write time are unchanged
(and the file has settled), so manifests cost a stat per proxy.
- FrameTiers.RecordAsync checks proxy presence when it writes the sidecar and
returns the sequence's frames as they are, so a deep analysis or render that
ran while proxies arrived no longer flags the frames preview-only again, and
the analysis advises from the current flags.
- Server manifests ignore ProxiesBuilt for frames the server cannot decode, so
frames added since the last proxy pass are asked for their proxies.
- GET /sequences/{id}/analysis/report answers 404 for a report that found
frames unreadable before their proxies arrived (DeepReports.ReadCurrentAsync).
- The deep checkpoint key marks only frames read from proxies, so checkpoints
written by earlier versions still resume.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
29 lines
1.4 KiB
C#
29 lines
1.4 KiB
C#
using Titano.Core.Analysis.Deep;
|
|
using Titano.Core.Archiving;
|
|
using Titano.Core.Imaging;
|
|
using Titano.Core.Model;
|
|
|
|
namespace Titano.Data.Processing;
|
|
|
|
/// <summary>
|
|
/// Saved deep-analysis reports (<c>.titano/analysis.json</c>, BRIEF §10.2) for hosts that hand them on: a server serves
|
|
/// one to the editors of its clients only while it still describes the sequence (§14.5).
|
|
/// </summary>
|
|
public static class DeepReports
|
|
{
|
|
/// <summary>
|
|
/// The saved report of <paramref name="sequence"/> when it describes its frames as a host with
|
|
/// <paramref name="decoder"/> reads them now; null when there is none, it covers another number of frames, or it
|
|
/// found unreadable a frame that has been read from its proxy since (an original that host cannot decode, whose proxy
|
|
/// arrived after the analysis): its verdict and its advice to exclude that frame no longer hold.
|
|
/// </summary>
|
|
public static async Task<DeepAnalysisReport?> ReadCurrentAsync(TitanoDatabase db, Archive archive, Sequence sequence, ImageDecoder decoder,
|
|
CancellationToken cancellationToken)
|
|
{
|
|
ArgumentNullException.ThrowIfNull(archive);
|
|
ArgumentNullException.ThrowIfNull(sequence);
|
|
var frames = await SequenceFrames.LoadAsync(db, archive, sequence, useProxies: false, decoder, cancellationToken).ConfigureAwait(false);
|
|
return SequenceAnalyser.ReadReport(new ArchivePaths(archive.RootPath).Sequence(sequence.Folder), frames);
|
|
}
|
|
}
|