From 3d5b4f869c9edb1e297b89b82221ee837ac6330e Mon Sep 17 00:00:00 2001 From: Mark Monteiro Date: Sat, 4 Apr 2020 13:16:41 -0400 Subject: [PATCH] Register ILiveTvManager and IPlaylistManager correctly --- Emby.Server.Implementations/ApplicationHost.cs | 6 +++--- Emby.Server.Implementations/LiveTv/LiveTvManager.cs | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs index aa1e9ab9d4..94d656e16c 100644 --- a/Emby.Server.Implementations/ApplicationHost.cs +++ b/Emby.Server.Implementations/ApplicationHost.cs @@ -797,10 +797,9 @@ namespace Emby.Server.Implementations CollectionManager = new CollectionManager(LibraryManager, ApplicationPaths, LocalizationManager, FileSystemManager, LibraryMonitor, LoggerFactory, ProviderManager); serviceCollection.AddSingleton(CollectionManager); - serviceCollection.AddSingleton(typeof(IPlaylistManager), typeof(PlaylistManager)); + serviceCollection.AddSingleton(); - LiveTvManager = new LiveTvManager(this, ServerConfigurationManager, LoggerFactory, ItemRepository, ImageProcessor, UserDataManager, DtoService, UserManager, LibraryManager, TaskManager, LocalizationManager, JsonSerializer, FileSystemManager, () => ChannelManager); - serviceCollection.AddSingleton(LiveTvManager); + serviceCollection.AddSingleton(); serviceCollection.AddSingleton(); @@ -833,6 +832,7 @@ namespace Emby.Server.Implementations /// public void InitializeServices() { + LiveTvManager = Resolve(); NotificationManager = Resolve(); HttpServer = Resolve(); diff --git a/Emby.Server.Implementations/LiveTv/LiveTvManager.cs b/Emby.Server.Implementations/LiveTv/LiveTvManager.cs index b64fe8634c..eabc207867 100644 --- a/Emby.Server.Implementations/LiveTv/LiveTvManager.cs +++ b/Emby.Server.Implementations/LiveTv/LiveTvManager.cs @@ -49,7 +49,7 @@ namespace Emby.Server.Implementations.LiveTv private readonly ILibraryManager _libraryManager; private readonly ITaskManager _taskManager; private readonly IJsonSerializer _jsonSerializer; - private readonly Func _channelManager; + private readonly IChannelManager _channelManager; private readonly IDtoService _dtoService; private readonly ILocalizationManager _localization; @@ -76,7 +76,7 @@ namespace Emby.Server.Implementations.LiveTv ILocalizationManager localization, IJsonSerializer jsonSerializer, IFileSystem fileSystem, - Func channelManager) + IChannelManager channelManager) { _config = config; _logger = loggerFactory.CreateLogger(nameof(LiveTvManager)); @@ -2482,7 +2482,7 @@ namespace Emby.Server.Implementations.LiveTv .OrderBy(i => i.SortName) .ToList(); - folders.AddRange(_channelManager().GetChannelsInternal(new MediaBrowser.Model.Channels.ChannelQuery + folders.AddRange(_channelManager.GetChannelsInternal(new MediaBrowser.Model.Channels.ChannelQuery { UserId = user.Id, IsRecordingsFolder = true,