fix(sync): offer exports once originals agree; capture proxies after the main screens
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
+17
-7
No files matched your search
@@ -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
|
/// 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
|
/// archive engine (WIC first, then managed decoders), the analysis and render engine (the same decoders; Media
|
||||||
/// Foundation, then managed encoders), the one <see cref="JobEngine"/> of this PC with the handlers of
|
/// Foundation, then managed encoders), the one <see cref="JobEngine"/> of this PC with the handlers of
|
||||||
/// <see cref="CreateJobHandlers"/>, thumbnails, the server session, the render node, the encoder inventory and the
|
/// <see cref="CreateJobHandlers"/>, thumbnails, the server session, the render node, the encoder inventory, the
|
||||||
/// update check, and the sync with the signed-in server (<see cref="SyncHost"/>). Started after the window shows, stopped when the app exits. The last archive is reopened at start and
|
/// update check and the sync with the signed-in server (<see cref="SyncHost"/>). Started after the window shows,
|
||||||
|
/// stopped when the app exits. The last archive is reopened at start and
|
||||||
/// rescanned every <see cref="ScanInterval"/> (BRIEF §7: polling, no file-system watchers). The render node runs while
|
/// rescanned every <see cref="ScanInterval"/> (BRIEF §7: polling, no file-system watchers). The render node runs while
|
||||||
/// the user offers this PC (<see cref="AppSettings.RenderNodeOptIn"/>) and a server session is open.
|
/// the user offers this PC (<see cref="AppSettings.RenderNodeOptIn"/>) and a server session is open.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -94,7 +94,11 @@ public static class SyncText
|
|||||||
public static string Local(SyncEntry entry)
|
public static string Local(SyncEntry entry)
|
||||||
{
|
{
|
||||||
if (entry.HasLocalOriginals)
|
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");
|
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]);
|
actions.AddRange([SyncAction.TakeServer, SyncAction.SaveBoth]);
|
||||||
return actions;
|
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.ExportsToGet > 0) actions.Add(SyncAction.GetExports);
|
||||||
if (link.ExportsToSend > 0 && rights.CanUpload) actions.Add(SyncAction.SendExports);
|
if (link.ExportsToSend > 0 && rights.CanUpload) actions.Add(SyncAction.SendExports);
|
||||||
|
|||||||
@@ -57,7 +57,6 @@ public static class ScreenCapture
|
|||||||
await shell.Jobs.ReloadAsync();
|
await shell.Jobs.ReloadAsync();
|
||||||
await shell.Services.Server.RestoreAsync();
|
await shell.Services.Server.RestoreAsync();
|
||||||
await shell.Services.Sync.RefreshAsync();
|
await shell.Services.Sync.RefreshAsync();
|
||||||
await sample.CacheProxiesAsync();
|
|
||||||
await shell.Server.Sync.ReloadAsync();
|
await shell.Server.Sync.ReloadAsync();
|
||||||
shell.About.SetResult(null);
|
shell.About.SetResult(null);
|
||||||
await shell.Settings.DetectEncodersAsync();
|
await shell.Settings.DetectEncodersAsync();
|
||||||
@@ -101,7 +100,9 @@ public static class ScreenCapture
|
|||||||
written += await SaveAsync(window, directory, key.ToString().ToLowerInvariant(), theme);
|
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 sample.FillSyncAsync();
|
||||||
await shell.Server.Sync.ReloadAsync();
|
await shell.Server.Sync.ReloadAsync();
|
||||||
foreach (var theme in Themes)
|
foreach (var theme in Themes)
|
||||||
|
|||||||
@@ -633,7 +633,10 @@ public sealed class SyncService
|
|||||||
return await _db.Sequences.GetAsync(local.Id, cancellationToken).ConfigureAwait(false) ?? current;
|
return await _db.Sequences.GetAsync(local.Id, cancellationToken).ConfigureAwait(false) ?? current;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>"Save both": this PC's project is kept next to <c>project.json</c> as <c>project.this-pc-<local time>.json</c> before the server's replaces it.</summary>
|
/// <summary>
|
||||||
|
/// "Save both": this PC's project is kept next to <c>project.json</c> as <c>project.this-pc-<local time>.json</c>
|
||||||
|
/// before the server's replaces it; returns that file.
|
||||||
|
/// </summary>
|
||||||
private async Task<string> SaveCopyAsync(Sequence local, CancellationToken cancellationToken)
|
private async Task<string> SaveCopyAsync(Sequence local, CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
var archive = await _db.Archives.GetAsync(local.ArchiveId, cancellationToken).ConfigureAwait(false)
|
var archive = await _db.Archives.GetAsync(local.ArchiveId, cancellationToken).ConfigureAwait(false)
|
||||||
|
|||||||
Reference in new issue
Block a user