From 4f81f4daaa77ac58381a95f1fd32fecd4e0a7d2b Mon Sep 17 00:00:00 2001 From: Patrick Barron Date: Fri, 27 Jan 2023 18:41:10 -0500 Subject: Use depencency injection for ISubtitleProvider --- MediaBrowser.Controller/Subtitles/ISubtitleManager.cs | 6 ------ 1 file changed, 6 deletions(-) (limited to 'MediaBrowser.Controller') diff --git a/MediaBrowser.Controller/Subtitles/ISubtitleManager.cs b/MediaBrowser.Controller/Subtitles/ISubtitleManager.cs index 52aa44024..841b32037 100644 --- a/MediaBrowser.Controller/Subtitles/ISubtitleManager.cs +++ b/MediaBrowser.Controller/Subtitles/ISubtitleManager.cs @@ -19,12 +19,6 @@ namespace MediaBrowser.Controller.Subtitles /// event EventHandler SubtitleDownloadFailure; - /// - /// Adds the parts. - /// - /// The subtitle providers. - void AddParts(IEnumerable subtitleProviders); - /// /// Searches the subtitles. /// -- cgit v1.2.3 From f7ec85d7a0d30619721d13064437993d2f3a86d4 Mon Sep 17 00:00:00 2001 From: Patrick Barron Date: Fri, 27 Jan 2023 18:46:54 -0500 Subject: Use dependency injection for IChannel --- Emby.Server.Implementations/ApplicationHost.cs | 2 -- Emby.Server.Implementations/Channels/ChannelManager.cs | 13 +++++-------- MediaBrowser.Controller/Channels/IChannelManager.cs | 6 ------ 3 files changed, 5 insertions(+), 16 deletions(-) (limited to 'MediaBrowser.Controller') diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs index be4845c29..3527e4048 100644 --- a/Emby.Server.Implementations/ApplicationHost.cs +++ b/Emby.Server.Implementations/ApplicationHost.cs @@ -728,8 +728,6 @@ namespace Emby.Server.Implementations Resolve().AddParts(GetExports(), GetExports(), GetExports()); - Resolve().AddParts(GetExports()); - Resolve().AddParts(GetExports()); Resolve().AddParts(GetExports(), GetExports()); diff --git a/Emby.Server.Implementations/Channels/ChannelManager.cs b/Emby.Server.Implementations/Channels/ChannelManager.cs index 85ccbc028..84ba19464 100644 --- a/Emby.Server.Implementations/Channels/ChannelManager.cs +++ b/Emby.Server.Implementations/Channels/ChannelManager.cs @@ -66,6 +66,7 @@ namespace Emby.Server.Implementations.Channels /// The user data manager. /// The provider manager. /// The memory cache. + /// The channels. public ChannelManager( IUserManager userManager, IDtoService dtoService, @@ -75,7 +76,8 @@ namespace Emby.Server.Implementations.Channels IFileSystem fileSystem, IUserDataManager userDataManager, IProviderManager providerManager, - IMemoryCache memoryCache) + IMemoryCache memoryCache, + IEnumerable channels) { _userManager = userManager; _dtoService = dtoService; @@ -86,18 +88,13 @@ namespace Emby.Server.Implementations.Channels _userDataManager = userDataManager; _providerManager = providerManager; _memoryCache = memoryCache; + Channels = channels.ToArray(); } - internal IChannel[] Channels { get; private set; } + internal IChannel[] Channels { get; } private static TimeSpan CacheLength => TimeSpan.FromHours(3); - /// - public void AddParts(IEnumerable channels) - { - Channels = channels.ToArray(); - } - /// public bool EnableMediaSourceDisplay(BaseItem item) { diff --git a/MediaBrowser.Controller/Channels/IChannelManager.cs b/MediaBrowser.Controller/Channels/IChannelManager.cs index 49be897ef..e392a3493 100644 --- a/MediaBrowser.Controller/Channels/IChannelManager.cs +++ b/MediaBrowser.Controller/Channels/IChannelManager.cs @@ -15,12 +15,6 @@ namespace MediaBrowser.Controller.Channels { public interface IChannelManager { - /// - /// Adds the parts. - /// - /// The channels. - void AddParts(IEnumerable channels); - /// /// Gets the channel features. /// -- cgit v1.2.3