Add private replay draft for refined podcasts

Emissions opted into RefineReplay (ignored for OBS) get an owner-only
source.mp4 draft after the live or an interruption. The owner saves
revisioned marks and removed ranges, streams the source and queues an
idempotent publication; the worker renders or copies it within quota and
atomically replaces replay.mp4. Originals and drafts stay private until
publication, and the web catalogue shows "Replay en preparation".

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Paul Schneider 2026-11-16 14:22:14 +00:00
commit 46fc937443
Signed by: notazof
GPG key ID: AD4B9B545FBD7D12
22 changed files with 6069 additions and 40 deletions

View file

@ -20,16 +20,22 @@ namespace Yavsc.Services
/// <returns></returns>
Task<bool> AcceptStream (HttpContext context, ApplicationUser user, string destDir, string fileName);
Task<PodcastResponse> CreateAsync(string ownerId, string ownerName, string title, CancellationToken ct, Guid? id = null);
Task<PodcastResponse> CreateAsync(string ownerId, string ownerName, string title, CancellationToken ct,
Guid? id = null, bool refineReplay = false);
Task<IReadOnlyList<PodcastResponse>> ListAsync(CancellationToken ct);
Task<PodcastManifestResponse> GetAsync(Guid id, CancellationToken ct);
Task<PodcastResponse> AppendAsync(Guid id, string ownerId, int sequence,
double durationSeconds, Stream input, CancellationToken ct);
Task<PodcastResponse> CompleteAsync(Guid id, string ownerId, CancellationToken ct);
Task<Stream> OpenSegmentAsync(Guid id, int sequence, CancellationToken ct);
/// <summary>Opens a segment; the originals of a refined emission are reserved to its owner after the live.</summary>
Task<Stream> OpenSegmentAsync(Guid id, int sequence, string? viewerId, CancellationToken ct);
Task<Stream> OpenReplayAsync(Guid id, CancellationToken ct);
Task<bool> PrepareNextReplayAsync(IPodcastReplayRemuxer remuxer, CancellationToken ct);
Task RetryReplayAsync(Guid id, string ownerId, CancellationToken ct);
Task<PodcastResponse> SaveDraftAsync(Guid id, string ownerId, SavePodcastDraftRequest request, CancellationToken ct);
Task<PodcastResponse> PublishDraftAsync(Guid id, string ownerId, int revision, CancellationToken ct);
Task<Stream> OpenDraftSourceAsync(Guid id, string ownerId, CancellationToken ct);
Task<bool> PublishNextDraftAsync(IPodcastReplayEditor editor, CancellationToken ct);
Task DeleteAsync(Guid id, string ownerId, CancellationToken ct);
}