fix(proxies): use only a frame's own proxy and let tiers, reports and built flags follow it
- Renders, analyses, the server's manifests and proxy downloads take a proxy only when its Exif capture time is the frame's (ArchiveImages.IsProxyOf); one left at the index by a frame renumbered since counts as missing and is asked for again (V-24). - A frame whose original the host reads through its proxy (HEIF on the server) is preview-only only while it has none: the light analysis and the proxy pass keep the flag, the preview-only count, the light finding and the advisor's output cap in step with the proxies, and an arriving proxy queues a light analysis on the server (V-1, V-25). - The deep checkpoint's content key includes whether each frame is read from its original or its proxy, and analysis.json lists the frames measured from proxies; an unreadable verdict on a frame now read from its proxy makes the report stale (V-26). - Thumbnails drawn from proxies are compared with the archive's thumbnail size instead of 320 px (V-27). - A resumed thumbnail or proxy pass sets ThumbsBuilt/ProxiesBuilt only when the frames an earlier run did still have theirs, and the proxy pass logs frames waiting for a client's proxy apart from unreadable ones (V-28). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
This commit is contained in:
22 files changed
+601
-59
No files matched your search
@@ -56,6 +56,24 @@ public sealed class DecodeTierTests(TestContext context)
|
||||
SequenceFrames.WithTier(none, new FileTier(ImageFileFormat.Cr2, DecodeTier.Unavailable, null, "nothing here", 0, 0), damaged: false).Flags);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void AFrameReadFromItsProxyKeepsItsPreviewTierButIsNotPreviewOnly()
|
||||
{
|
||||
// A HEIF on the server: its decoders find only the Exif thumbnail, but renders read the proxy a client sent.
|
||||
var heif = Sidecar() with { File = "originals/IMG_0001.HEIC", Format = ImageFileFormat.Heif, Flags = FrameFlags.Duplicate };
|
||||
var thumbnail = new FileTier(ImageFileFormat.Heif, DecodeTier.EmbeddedPreview, "managed-preview", "no managed decoder for Heif", 160, 120);
|
||||
var proxied = SequenceFrames.WithTier(heif, thumbnail, damaged: false, proxied: true);
|
||||
Assert.Equal((DecodeTier.EmbeddedPreview, FrameFlags.Duplicate, (int?)160, (int?)120), (proxied.Tier, proxied.Flags, proxied.PreviewW, proxied.PreviewH));
|
||||
|
||||
// The flag follows the proxy, the tier and preview size stay the original's.
|
||||
var gone = SequenceFrames.WithProxy(proxied, proxied: false);
|
||||
Assert.Equal((DecodeTier.EmbeddedPreview, FrameFlags.Duplicate | FrameFlags.PreviewOnly, (int?)160), (gone.Tier, gone.Flags, gone.PreviewW));
|
||||
Assert.Equal(FrameFlags.Duplicate, SequenceFrames.WithProxy(gone, proxied: true).Flags);
|
||||
// Other tiers have no preview-only flag to follow.
|
||||
var unavailable = SequenceFrames.WithTier(heif, new FileTier(ImageFileFormat.Heif, DecodeTier.Unavailable, null, "nothing", 0, 0), damaged: false);
|
||||
Assert.Same(unavailable, SequenceFrames.WithProxy(unavailable, proxied: false));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void SidecarsKeepTheTierAndThePreviewSizeAndOlderOnesReadAsUnknown()
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user