add playback troubleshooting speed indicator (#2521)
* more api fixes * add playback troubleshooting speed indicator
This commit is contained in:
@@ -39,6 +39,6 @@ public class FFmpegProfileController(IMediator mediator) : ControllerBase
|
||||
public async Task<IActionResult> DeleteProfileAsync(int id, CancellationToken cancellationToken)
|
||||
{
|
||||
Either<BaseError, Unit> result = await mediator.Send(new DeleteFFmpegProfile(id), cancellationToken);
|
||||
return result.Match<IActionResult>(_ => Ok(), error => Problem(error.ToString()));
|
||||
return result.Match<IActionResult>(_ => Ok(), error => Conflict(error.ToString()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using ErsatzTV.Application.FFmpegProfiles;
|
||||
using ErsatzTV.Application.Resolutions;
|
||||
using MediatR;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
@@ -9,10 +9,10 @@ namespace ErsatzTV.Controllers.Api;
|
||||
public class ResolutionController(IMediator mediator) : ControllerBase
|
||||
{
|
||||
[HttpGet("/api/ffmpeg/resolution/by-name/{name}", Name="GetResolutionByName")]
|
||||
public async Task<ActionResult<int>> GetResolutionByName(string name, CancellationToken cancellationToken)
|
||||
public async Task<ActionResult<ResolutionViewModel>> GetResolutionByName(string name, CancellationToken cancellationToken)
|
||||
{
|
||||
Option<int> result = await mediator.Send(new GetResolutionByName(name), cancellationToken);
|
||||
return result.Match<ActionResult<int>>(i => Ok(i), () => NotFound());
|
||||
Option<ResolutionViewModel> result = await mediator.Send(new GetResolutionByName(name), cancellationToken);
|
||||
return result.Match<ActionResult<ResolutionViewModel>>(i => Ok(i), () => NotFound());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ public class VersionController
|
||||
|
||||
static VersionController() =>
|
||||
Version = new CombinedVersion(
|
||||
2,
|
||||
3,
|
||||
Assembly.GetEntryAssembly()?
|
||||
.GetCustomAttribute<AssemblyInformationalVersionAttribute>()?
|
||||
.InformationalVersion ?? "unknown");
|
||||
|
||||
Reference in New Issue
Block a user