add start from beginning option to playback troubleshooting (#2182)

This commit is contained in:
Jason Dove
2025-07-21 16:17:16 +00:00
committed by GitHub
parent 2a05cc6e32
commit 626af6876b
7 changed files with 48 additions and 19 deletions
@@ -26,10 +26,12 @@ public class TroubleshootController(
int ffmpegProfile,
[FromQuery]
int watermark,
[FromQuery]
bool startFromBeginning,
CancellationToken cancellationToken)
{
Either<BaseError, Command> result = await mediator.Send(
new PrepareTroubleshootingPlayback(mediaItem, ffmpegProfile, watermark),
new PrepareTroubleshootingPlayback(mediaItem, ffmpegProfile, watermark, startFromBeginning),
cancellationToken);
return await result.MatchAsync<IActionResult>(
@@ -83,10 +85,12 @@ public class TroubleshootController(
int ffmpegProfile,
[FromQuery]
int watermark,
[FromQuery]
bool startFromBeginning,
CancellationToken cancellationToken)
{
Option<string> maybeArchivePath = await mediator.Send(
new ArchiveTroubleshootingResults(mediaItem, ffmpegProfile, watermark),
new ArchiveTroubleshootingResults(mediaItem, ffmpegProfile, watermark, startFromBeginning),
cancellationToken);
foreach (string archivePath in maybeArchivePath)