diff --git a/CHANGELOG.md b/CHANGELOG.md index ed80d3a8a..86ac6cc6a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Fix a shuffled sequence with `repeat` making the build run with no end; this stopped all other background work - Fix bug in XMLTV template for episodes that was breaking thumbnail artwork - Those with customized `episode.sbntxt` templates will want to make a similar fix +- Disable HDHR endpoints when JWT is used; they never worked in this configuration in the first place ## [26.8.1] - 2026-08-29 ### Security diff --git a/ErsatzTV/Pages/Settings/HDHRSettings.razor b/ErsatzTV/Pages/Settings/HDHRSettings.razor index 2a032ef82..288b0bc0c 100644 --- a/ErsatzTV/Pages/Settings/HDHRSettings.razor +++ b/ErsatzTV/Pages/Settings/HDHRSettings.razor @@ -8,12 +8,18 @@ - Save Settings + Save Settings
HDHomeRun + @if (JwtHelper.IsEnabled) + { + + HDHomeRun endpoints are disabled because JWT is used. These settings have no effect. + + }
UUID @@ -24,7 +30,7 @@
Tuner Count
- +
diff --git a/ErsatzTV/RemoveHdhrConvention.cs b/ErsatzTV/RemoveHdhrConvention.cs new file mode 100644 index 000000000..0e4f23096 --- /dev/null +++ b/ErsatzTV/RemoveHdhrConvention.cs @@ -0,0 +1,26 @@ +using System.Reflection; +using ErsatzTV.Controllers; +using Microsoft.AspNetCore.Mvc.ApplicationModels; + +namespace ErsatzTV; + +public class RemoveHdhrConvention : IApplicationModelConvention +{ + public void Apply(ApplicationModel application) + { + Option toRemove = None; + foreach (ControllerModel controller in application.Controllers) + { + if (controller.ControllerType == typeof(HdhrController).GetTypeInfo()) + { + toRemove = controller; + break; + } + } + + foreach (ControllerModel remove in toRemove) + { + application.Controllers.Remove(remove); + } + } +} diff --git a/ErsatzTV/Startup.cs b/ErsatzTV/Startup.cs index 494abc589..044852f8c 100644 --- a/ErsatzTV/Startup.cs +++ b/ErsatzTV/Startup.cs @@ -317,6 +317,11 @@ public class Startup services.AddControllers(options => { + if (JwtHelper.IsEnabled) + { + options.Conventions.Add(new RemoveHdhrConvention()); + } + options.OutputFormatters.Insert(0, new ConcatPlaylistOutputFormatter()); options.OutputFormatters.Insert(0, new ChannelPlaylistOutputFormatter()); options.OutputFormatters.Insert(0, new ChannelGuideOutputFormatter());