The Free Software Media System - Server Backend & API
Use GetEncodingOptions where possible
Bond_009b1fe28d0a6c1
diff --git a/Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunHost.cs b/Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunHost.csindex 5ef83f2746..0760e81274 100644--- a/Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunHost.cs+++ b/Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunHost.cs@@ -335,11 +335,6 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts.HdHomerunreturn new Uri(url).AbsoluteUri.TrimEnd('/');}- protected EncodingOptions GetEncodingOptions()- {- return Config.GetConfiguration<EncodingOptions>("encoding");- }-private static string GetHdHrIdFromChannelId(string channelId){return channelId.Split('_')[1];diff --git a/Jellyfin.Api/Models/PlaybackDtos/TranscodingThrottler.cs b/Jellyfin.Api/Models/PlaybackDtos/TranscodingThrottler.csindex 872a468245..e33e552edb 100644--- a/Jellyfin.Api/Models/PlaybackDtos/TranscodingThrottler.cs+++ b/Jellyfin.Api/Models/PlaybackDtos/TranscodingThrottler.cs@@ -98,7 +98,7 @@ namespace Jellyfin.Api.Models.PlaybackDtosprivate EncodingOptions GetOptions(){- return _config.GetConfiguration<EncodingOptions>("encoding");+ return _config.GetEncodingOptions();}private async void TimerCallback(object? state)diff --git a/Jellyfin.Server/Migrations/Routines/DisableTranscodingThrottling.cs b/Jellyfin.Server/Migrations/Routines/DisableTranscodingThrottling.csindex 0925a87b55..bf0225e988 100644--- a/Jellyfin.Server/Migrations/Routines/DisableTranscodingThrottling.cs+++ b/Jellyfin.Server/Migrations/Routines/DisableTranscodingThrottling.cs@@ -32,7 +32,7 @@ namespace Jellyfin.Server.Migrations.Routinespublic void Perform(){// Set EnableThrottling to false since it wasn't used before and may introduce issues- var encoding = _configManager.GetConfiguration<EncodingOptions>("encoding");+ var encoding = _configManager.GetEncodingOptions();if (encoding.EnableThrottling){_logger.LogInformation("Disabling transcoding throttling during migration");diff --git a/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs b/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.csindex c0b6cf28bb..45872b5c08 100644--- a/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs+++ b/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs@@ -103,7 +103,7 @@ namespace MediaBrowser.MediaEncoding.Encoderpublic void SetFFmpegPath(){// 1) Custom path stored in config/encoding xml file under tag <EncoderAppPath> takes precedence- if (!ValidatePath(_configurationManager.GetConfiguration<EncodingOptions>("encoding").EncoderAppPath, FFmpegLocation.Custom))+ if (!ValidatePath(_configurationManager.GetEncodingOptions().EncoderAppPath, FFmpegLocation.Custom)){// 2) Check if the --ffmpeg CLI switch has been givenif (!ValidatePath(_startupOptionFFmpegPath, FFmpegLocation.SetByArgument))@@ -118,7 +118,7 @@ namespace MediaBrowser.MediaEncoding.Encoder}// Write the FFmpeg path to the config/encoding.xml file as <EncoderAppPathDisplay> so it appears in UI- var config = _configurationManager.GetConfiguration<EncodingOptions>("encoding");+ var config = _configurationManager.GetEncodingOptions();config.EncoderAppPathDisplay = _ffmpegPath ?? string.Empty;_configurationManager.SaveConfiguration("encoding", config);@@ -177,7 +177,7 @@ namespace MediaBrowser.MediaEncoding.Encoder// Write the new ffmpeg path to the xml as <EncoderAppPath>// This ensures its not lost on next startup- var config = _configurationManager.GetConfiguration<EncodingOptions>("encoding");+ var config = _configurationManager.GetEncodingOptions();config.EncoderAppPath = newPath;_configurationManager.SaveConfiguration("encoding", config);