feat: add authenticated live podcasts and simplify native video playback
Include podcast capture, ingestion and replay, dependency and installer updates, and native video positioning after navigation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
parent
d9b183c500
commit
4fc91cec3e
45 changed files with 2330 additions and 378 deletions
21
src/Yavsc.Api/Middleware/PodcastExceptionFilter.cs
Normal file
21
src/Yavsc.Api/Middleware/PodcastExceptionFilter.cs
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
using System.Text.Json;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.Filters;
|
||||
using Yavsc.Services;
|
||||
|
||||
namespace Yavsc.Api.Middleware;
|
||||
|
||||
public sealed class PodcastExceptionFilter(ILogger<PodcastExceptionFilter> logger) : IExceptionFilter
|
||||
{
|
||||
public void OnException(ExceptionContext context)
|
||||
{
|
||||
var exception = context.Exception;
|
||||
if (exception is not (PodcastException or IOException or JsonException))
|
||||
return;
|
||||
var status = exception is PodcastException podcast ? podcast.StatusCode : StatusCodes.Status503ServiceUnavailable;
|
||||
var detail = exception is PodcastException ? exception.Message : "Le stockage des podcasts est indisponible.";
|
||||
logger.LogWarning(exception, "Podcast request failed with status {Status}", status);
|
||||
context.Result = new ObjectResult(new ProblemDetails { Status = status, Title = detail }) { StatusCode = status };
|
||||
context.ExceptionHandled = true;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue