diff options
| author | William Taylor <me@willtaylor.info> | 2019-01-17 22:55:05 +0000 |
|---|---|---|
| committer | William Taylor <me@willtaylor.info> | 2019-01-20 21:05:12 +0000 |
| commit | 65cd3ed597c60503a517c06ad16c933ebf2434a9 (patch) | |
| tree | 772d1d8d1b77a2363500dde7cf5a4d572fdf968f /Emby.Server.Implementations/LiveTv/LiveTvManager.cs | |
| parent | 0586598d33ea5eeed36259fe970a7e3184f6b087 (diff) | |
Replaced injections of ILogger with ILoggerFactory
This makes resolving dependencies from the container much easier as
you cannot resolve with primitives parameters in a way that is any
more readable.
The aim of this commit is to change as little as possible with the end
result, loggers that were newed up for the parent object were given the same
name. Objects that used the base or app loggers, were given a new logger with
an appropriate name.
Also removed some unused dependencies.
Diffstat (limited to 'Emby.Server.Implementations/LiveTv/LiveTvManager.cs')
| -rw-r--r-- | Emby.Server.Implementations/LiveTv/LiveTvManager.cs | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/Emby.Server.Implementations/LiveTv/LiveTvManager.cs b/Emby.Server.Implementations/LiveTv/LiveTvManager.cs index 11d7facbe..575cb1c77 100644 --- a/Emby.Server.Implementations/LiveTv/LiveTvManager.cs +++ b/Emby.Server.Implementations/LiveTv/LiveTvManager.cs @@ -72,14 +72,10 @@ namespace Emby.Server.Implementations.LiveTv return EmbyTV.EmbyTV.Current.GetActiveRecordingPath(id); } - private IServerApplicationHost _appHost; - private IHttpClient _httpClient; - public LiveTvManager( IServerApplicationHost appHost, - IHttpClient httpClient, IServerConfigurationManager config, - ILogger logger, + ILoggerFactory loggerFactory, IItemRepository itemRepo, IImageProcessor imageProcessor, IUserDataManager userDataManager, @@ -93,9 +89,8 @@ namespace Emby.Server.Implementations.LiveTv IFileSystem fileSystem, Func<IChannelManager> channelManager) { - _appHost = appHost; _config = config; - _logger = logger; + _logger = loggerFactory.CreateLogger(nameof(LiveTvManager)); _itemRepo = itemRepo; _userManager = userManager; _libraryManager = libraryManager; @@ -107,9 +102,8 @@ namespace Emby.Server.Implementations.LiveTv _dtoService = dtoService; _userDataManager = userDataManager; _channelManager = channelManager; - _httpClient = httpClient; - _tvDtoService = new LiveTvDtoService(dtoService, imageProcessor, logger, appHost, _libraryManager); + _tvDtoService = new LiveTvDtoService(dtoService, imageProcessor, loggerFactory, appHost, _libraryManager); } /// <summary> |
