fix(archive): the orphans fix queues the deep analysis a scan would
A desktop scan queues a background deep analysis of the sequences whose frames it changed when Settings > Analysis > After a scan is on; photos the Archive screen's orphans fix indexed got only the light analysis, which then dropped the deep status. ArchiveService.ReconcileAsync takes that setting and queues the deep analysis too, at background priority. A follow-up is left out when a queued job of its kind already covers the sequence, whatever else that job targets, as the scan's follow-ups check. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
This commit is contained in:
4 files changed
+57
-11
No files matched your search
@@ -113,7 +113,7 @@ public sealed class ArchiveIntegrityTests(TestContext context)
|
||||
Assert.Equal(manifest.Frames[0].Id, orphans.MissingFiles.Single().Id);
|
||||
Assert.SequenceEqual(["New folder"], report.UnindexedFolders);
|
||||
|
||||
await fx.Service.ReconcileAsync(id, null, fx.Ct);
|
||||
await fx.Service.ReconcileAsync(id, null, deepAnalysis: false, fx.Ct);
|
||||
var frames = await fx.Db.Frames.ListBySequenceAsync(id);
|
||||
Assert.Equal(4, frames.Count);
|
||||
Assert.Equal(FrameFlags.Missing, frames[0].Flags);
|
||||
@@ -136,9 +136,10 @@ public sealed class ArchiveIntegrityTests(TestContext context)
|
||||
var folder = fx.Paths.Sequence((await fx.Db.Sequences.GetAsync(id, fx.Ct))!.Folder);
|
||||
File.WriteAllBytes(Path.Combine(folder.Originals, "dropped.JPG"), Photos.Jpeg(Start.AddMinutes(5), 50));
|
||||
|
||||
// The fix indexes the photo copied in by hand, and queues the thumbnails and proxies of the frames as they are now.
|
||||
// The fix indexes the photo copied in by hand, and queues the thumbnails and proxies of the frames as they are now;
|
||||
// no analysis, even when asked for one.
|
||||
var before = (await fx.Db.Jobs.ListAsync(null, null, 100, null, fx.Ct)).Items.Select(j => j.Id).ToHashSet();
|
||||
await server.ReconcileAsync(id, engine, fx.Ct);
|
||||
await server.ReconcileAsync(id, engine, deepAnalysis: true, fx.Ct);
|
||||
var queued = (await fx.Db.Jobs.ListAsync(null, null, 100, null, fx.Ct)).Items.Where(j => !before.Contains(j.Id)).ToList();
|
||||
Assert.SequenceEqual([JobKind.Proxies, JobKind.Thumbs], queued.Select(j => j.Kind).Order());
|
||||
foreach (var job in queued)
|
||||
|
||||
Reference in new issue
Block a user