diff --git a/src/Titano.App/Infrastructure/AppServices.cs b/src/Titano.App/Infrastructure/AppServices.cs index 9184d2b4..36091039 100644 --- a/src/Titano.App/Infrastructure/AppServices.cs +++ b/src/Titano.App/Infrastructure/AppServices.cs @@ -28,8 +28,9 @@ namespace Titano.App.Infrastructure; /// Composition root of local mode (BRIEF §4.4): the SQLite index under the data folder (migrated on open), the /// archive engine (WIC first, then managed decoders), the analysis and render engine (the same decoders; Media /// Foundation, then managed encoders), the one of this PC with the handlers of -/// , thumbnails, the server session, the render node, the encoder inventory and the -/// update check, and the sync with the signed-in server (). Started after the window shows, stopped when the app exits. The last archive is reopened at start and +/// , thumbnails, the server session, the render node, the encoder inventory, the +/// update check and the sync with the signed-in server (). Started after the window shows, +/// stopped when the app exits. The last archive is reopened at start and /// rescanned every (BRIEF §7: polling, no file-system watchers). The render node runs while /// the user offers this PC () and a server session is open. /// diff --git a/src/Titano.App/Server/SyncText.cs b/src/Titano.App/Server/SyncText.cs index c3d66d66..f55ab693 100644 --- a/src/Titano.App/Server/SyncText.cs +++ b/src/Titano.App/Server/SyncText.cs @@ -94,7 +94,11 @@ public static class SyncText public static string Local(SyncEntry entry) { if (entry.HasLocalOriginals) - return (entry.Local!.Status & SequenceStatus.ProxiesBuilt) != 0 ? Join(Loc.L("Server.Sync.Originals"), Loc.L("Server.Sync.Proxies")) : Loc.L("Server.Sync.Originals"); + { + return (entry.Local!.Status & SequenceStatus.ProxiesBuilt) != 0 + ? Join(Loc.L("Server.Sync.Originals"), Loc.L("Server.Sync.Proxies")) + : Loc.L("Server.Sync.Originals"); + } return entry.Link is { ProxiesCached: > 0 } ? Loc.L("Server.Sync.Proxies") : Loc.L("Server.Sync.None"); } @@ -202,7 +206,8 @@ public static class SyncText actions.AddRange([SyncAction.TakeServer, SyncAction.SaveBoth]); return actions; } - if (entry is { Local: not null, Link: { } link }) + // Renders travel on request once no original is waiting to go either way. + if (entry is { Local: not null, Link: { MissingRemote: 0, MissingLocal: 0 } link }) { if (link.ExportsToGet > 0) actions.Add(SyncAction.GetExports); if (link.ExportsToSend > 0 && rights.CanUpload) actions.Add(SyncAction.SendExports); diff --git a/src/Titano.App/Shell/ScreenCapture.cs b/src/Titano.App/Shell/ScreenCapture.cs index af7efa5e..c4fa8290 100644 --- a/src/Titano.App/Shell/ScreenCapture.cs +++ b/src/Titano.App/Shell/ScreenCapture.cs @@ -57,7 +57,6 @@ public static class ScreenCapture await shell.Jobs.ReloadAsync(); await shell.Services.Server.RestoreAsync(); await shell.Services.Sync.RefreshAsync(); - await sample.CacheProxiesAsync(); await shell.Server.Sync.ReloadAsync(); shell.About.SetResult(null); await shell.Settings.DetectEncodersAsync(); @@ -101,7 +100,9 @@ public static class ScreenCapture written += await SaveAsync(window, directory, key.ToString().ToLowerInvariant(), theme); } } - // The sync table with transfers in every state, then filtered to the conflict, then the conflict's confirmation. + // The sync table with proxies kept here and transfers in every state, then filtered to the conflict, then the + // conflict's confirmation (after the other screens, so the Jobs capture keeps its own sample). + await sample.CacheProxiesAsync(); await sample.FillSyncAsync(); await shell.Server.Sync.ReloadAsync(); foreach (var theme in Themes) diff --git a/src/Titano.Data/Sync/SyncService.cs b/src/Titano.Data/Sync/SyncService.cs index 4b46f848..a1a3232d 100644 --- a/src/Titano.Data/Sync/SyncService.cs +++ b/src/Titano.Data/Sync/SyncService.cs @@ -633,7 +633,10 @@ public sealed class SyncService return await _db.Sequences.GetAsync(local.Id, cancellationToken).ConfigureAwait(false) ?? current; } - /// "Save both": this PC's project is kept next to project.json as project.this-pc-<local time>.json before the server's replaces it. + /// + /// "Save both": this PC's project is kept next to project.json as project.this-pc-<local time>.json + /// before the server's replaces it; returns that file. + /// private async Task SaveCopyAsync(Sequence local, CancellationToken cancellationToken) { var archive = await _db.Archives.GetAsync(local.ArchiveId, cancellationToken).ConfigureAwait(false)