feat(data): filter sequences by renders and sync state; read a remote sequence's first frame alone
SequenceQuery.Rendered and SyncStates back the Library's Rendered, Not rendered and Synced status choices. ISyncRemote.FirstFrameAsync reads one row of the frames page (default: the whole list), so a remote card without a hero frame no longer downloads the server's manifest for its thumbnail. 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
+31
-2
No files matched your search
@@ -23,6 +23,10 @@ public interface ISyncRemote : IDisposable
|
||||
/// <summary>Every frame row of a sequence, in index order.</summary>
|
||||
Task<IReadOnlyList<FrameDto>> ListFramesAsync(Guid sequenceId, CancellationToken cancellationToken);
|
||||
|
||||
/// <summary>The first frame row of a sequence (its thumbnail stands for a sequence without a hero frame); null when it has none yet.</summary>
|
||||
async Task<FrameDto?> FirstFrameAsync(Guid sequenceId, CancellationToken cancellationToken) =>
|
||||
(await ListFramesAsync(sequenceId, cancellationToken).ConfigureAwait(false)).FirstOrDefault();
|
||||
|
||||
/// <summary>A 409 <see cref="TitanoApiException"/> means the settings version moved on the server.</summary>
|
||||
Task<SequenceDto> UpdateSequenceAsync(Guid id, UpdateSequenceRequest request, CancellationToken cancellationToken);
|
||||
|
||||
@@ -98,6 +102,10 @@ public sealed class TitanoSyncRemote(TitanoClient client, bool ownsClient) : ISy
|
||||
return all;
|
||||
}
|
||||
|
||||
/// <summary>One row of the first frames page instead of the whole list.</summary>
|
||||
public async Task<FrameDto?> FirstFrameAsync(Guid sequenceId, CancellationToken cancellationToken) =>
|
||||
(await client.ListFramesAsync(sequenceId, null, 1, cancellationToken).ConfigureAwait(false)).Items.FirstOrDefault();
|
||||
|
||||
public Task<SequenceDto> UpdateSequenceAsync(Guid id, UpdateSequenceRequest request, CancellationToken cancellationToken) =>
|
||||
client.UpdateSequenceAsync(id, request, cancellationToken);
|
||||
|
||||
|
||||
Reference in new issue
Block a user