From 56db20faa0c96a7ed13a9983f9ca556c2679256c Mon Sep 17 00:00:00 2001 From: Jason Dove Date: Fri, 12 Aug 2022 19:48:24 -0500 Subject: [PATCH] limit segmenter delay to 8s (#924) * always return initial hls playlist after 8 seconds * update dependencies * make fluentvalidation happy --- CHANGELOG.md | 3 +++ ErsatzTV.Application/ErsatzTV.Application.csproj | 2 +- .../Commands/StartFFmpegSessionHandler.cs | 5 ++++- ErsatzTV.Core.Tests/ErsatzTV.Core.Tests.csproj | 4 ++-- ErsatzTV.Core/ErsatzTV.Core.csproj | 2 +- ErsatzTV.FFmpeg.Tests/ErsatzTV.FFmpeg.Tests.csproj | 2 +- .../ErsatzTV.Infrastructure.Tests.csproj | 2 +- .../ErsatzTV.Infrastructure.csproj | 8 ++++---- ErsatzTV/ErsatzTV.csproj | 14 +++++++------- ErsatzTV/Startup.cs | 10 ++++------ 10 files changed, 28 insertions(+), 24 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5e4d8166f..641ec852a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Support DSD audio file formats (DFF and DSF) in local song libraries - Support OGG audio file formats (OGG, OPUS, OGA, OGX, SPX) in local song libraries +### Changed +- Always return playlist after a maximum of 8 seconds while starting up an HLS Segmenter session + ## [0.6.5-beta] - 2022-08-02 ### Fixed - Fix database initializer; fresh installs with v0.6.4-beta are missing some config data and should upgrade diff --git a/ErsatzTV.Application/ErsatzTV.Application.csproj b/ErsatzTV.Application/ErsatzTV.Application.csproj index 76b8b5449..91a354425 100644 --- a/ErsatzTV.Application/ErsatzTV.Application.csproj +++ b/ErsatzTV.Application/ErsatzTV.Application.csproj @@ -12,7 +12,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/ErsatzTV.Application/Streaming/Commands/StartFFmpegSessionHandler.cs b/ErsatzTV.Application/Streaming/Commands/StartFFmpegSessionHandler.cs index 33f04a589..170ef70de 100644 --- a/ErsatzTV.Application/Streaming/Commands/StartFFmpegSessionHandler.cs +++ b/ErsatzTV.Application/Streaming/Commands/StartFFmpegSessionHandler.cs @@ -78,13 +78,16 @@ public class StartFFmpegSessionHandler : IRequestHandler - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/ErsatzTV.Core/ErsatzTV.Core.csproj b/ErsatzTV.Core/ErsatzTV.Core.csproj index 760d7d4e7..7cd26560c 100644 --- a/ErsatzTV.Core/ErsatzTV.Core.csproj +++ b/ErsatzTV.Core/ErsatzTV.Core.csproj @@ -18,7 +18,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/ErsatzTV.FFmpeg.Tests/ErsatzTV.FFmpeg.Tests.csproj b/ErsatzTV.FFmpeg.Tests/ErsatzTV.FFmpeg.Tests.csproj index 49464a8b9..f680fa95d 100644 --- a/ErsatzTV.FFmpeg.Tests/ErsatzTV.FFmpeg.Tests.csproj +++ b/ErsatzTV.FFmpeg.Tests/ErsatzTV.FFmpeg.Tests.csproj @@ -9,7 +9,7 @@ - + diff --git a/ErsatzTV.Infrastructure.Tests/ErsatzTV.Infrastructure.Tests.csproj b/ErsatzTV.Infrastructure.Tests/ErsatzTV.Infrastructure.Tests.csproj index be4c16d26..3a75aa2c8 100644 --- a/ErsatzTV.Infrastructure.Tests/ErsatzTV.Infrastructure.Tests.csproj +++ b/ErsatzTV.Infrastructure.Tests/ErsatzTV.Infrastructure.Tests.csproj @@ -10,7 +10,7 @@ - + diff --git a/ErsatzTV.Infrastructure/ErsatzTV.Infrastructure.csproj b/ErsatzTV.Infrastructure/ErsatzTV.Infrastructure.csproj index 05c4ffed3..8282590d1 100644 --- a/ErsatzTV.Infrastructure/ErsatzTV.Infrastructure.csproj +++ b/ErsatzTV.Infrastructure/ErsatzTV.Infrastructure.csproj @@ -14,13 +14,13 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/ErsatzTV/ErsatzTV.csproj b/ErsatzTV/ErsatzTV.csproj index 0b6d7a50a..4e8f2125d 100644 --- a/ErsatzTV/ErsatzTV.csproj +++ b/ErsatzTV/ErsatzTV.csproj @@ -55,20 +55,20 @@ - - + + - + - - - + + + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/ErsatzTV/Startup.cs b/ErsatzTV/Startup.cs index 2e121c39f..cffa9752b 100644 --- a/ErsatzTV/Startup.cs +++ b/ErsatzTV/Startup.cs @@ -52,6 +52,7 @@ using ErsatzTV.Infrastructure.Trakt; using ErsatzTV.Serialization; using ErsatzTV.Services; using ErsatzTV.Services.RunOnce; +using FluentValidation; using FluentValidation.AspNetCore; using Ganss.XSS; using MediatR; @@ -131,14 +132,11 @@ public class Startup opt.SerializerSettings.ReferenceLoopHandling = ReferenceLoopHandling.Ignore; opt.SerializerSettings.ContractResolver = new CustomContractResolver(); opt.SerializerSettings.Converters.Add(new StringEnumConverter()); - }) - .AddFluentValidation( - options => - { - options.RegisterValidatorsFromAssemblyContaining(); - options.ImplicitlyValidateChildProperties = true; }); + services.AddFluentValidationAutoValidation(); + services.AddValidatorsFromAssemblyContaining(); + if (!CurrentEnvironment.IsDevelopment()) { services.AddSpaStaticFiles(options => options.RootPath = "wwwroot/v2");