The Free Software Media System - Server Backend & API
Removed some unused fields
Bond_009a6a4cd5667fb
diff --git a/BDInfo/BDROM.cs b/BDInfo/BDROM.csindex 4360ff1d42..6759ed55ad 100644--- a/BDInfo/BDROM.cs+++ b/BDInfo/BDROM.cs@@ -165,7 +165,7 @@ namespace BDInfoforeach (var file in files){PlaylistFiles.Add(- file.Name.ToUpper(), new TSPlaylistFile(this, file, _fileSystem));+ file.Name.ToUpper(), new TSPlaylistFile(this, file));}}@@ -185,7 +185,7 @@ namespace BDInfoforeach (var file in files){StreamClipFiles.Add(- file.Name.ToUpper(), new TSStreamClipFile(file, _fileSystem));+ file.Name.ToUpper(), new TSStreamClipFile(file));}}diff --git a/BDInfo/TSPlaylistFile.cs b/BDInfo/TSPlaylistFile.csindex 6e91f6e408..1cc629b1de 100644--- a/BDInfo/TSPlaylistFile.cs+++ b/BDInfo/TSPlaylistFile.cs@@ -28,7 +28,6 @@ namespace BDInfo{public class TSPlaylistFile{- private readonly IFileSystem _fileSystem;private FileSystemMetadata FileInfo = null;public string FileType = null;public bool IsInitialized = false;@@ -64,21 +63,19 @@ namespace BDInfonew List<TSGraphicsStream>();public TSPlaylistFile(BDROM bdrom,- FileSystemMetadata fileInfo, IFileSystem fileSystem)+ FileSystemMetadata fileInfo){BDROM = bdrom;FileInfo = fileInfo;- _fileSystem = fileSystem;Name = fileInfo.Name.ToUpper();}public TSPlaylistFile(BDROM bdrom,string name,- List<TSStreamClip> clips, IFileSystem fileSystem)+ List<TSStreamClip> clips){BDROM = bdrom;Name = name;- _fileSystem = fileSystem;IsCustom = true;foreach (var clip in clips){diff --git a/BDInfo/TSStreamClipFile.cs b/BDInfo/TSStreamClipFile.csindex d840542ba9..e1097b23da 100644--- a/BDInfo/TSStreamClipFile.cs+++ b/BDInfo/TSStreamClipFile.cs@@ -28,7 +28,6 @@ namespace BDInfo{public class TSStreamClipFile{- private readonly IFileSystem _fileSystem;public FileSystemMetadata FileInfo = null;public string FileType = null;public bool IsValid = false;@@ -37,10 +36,9 @@ namespace BDInfopublic Dictionary<ushort, TSStream> Streams =new Dictionary<ushort, TSStream>();- public TSStreamClipFile(FileSystemMetadata fileInfo, IFileSystem fileSystem)+ public TSStreamClipFile(FileSystemMetadata fileInfo){FileInfo = fileInfo;- _fileSystem = fileSystem;Name = fileInfo.Name.ToUpper();}diff --git a/Emby.IsoMounting/IsoMounter/LinuxIsoManager.cs b/Emby.IsoMounting/IsoMounter/LinuxIsoManager.csindex a6fc53953e..943caa3e62 100644--- a/Emby.IsoMounting/IsoMounter/LinuxIsoManager.cs+++ b/Emby.IsoMounting/IsoMounter/LinuxIsoManager.cs@@ -19,7 +19,6 @@ namespace IsoMounterprivate readonly IEnvironmentInfo EnvironmentInfo;private readonly bool ExecutablesAvailable;- private readonly IFileSystem FileSystem;private readonly ILogger _logger;private readonly string MountCommand;private readonly string MountPointRoot;@@ -31,11 +30,10 @@ namespace IsoMounter#region Constructor(s)- public LinuxIsoManager(ILogger logger, IFileSystem fileSystem, IEnvironmentInfo environment, IProcessFactory processFactory)+ public LinuxIsoManager(ILogger logger, IEnvironmentInfo environment, IProcessFactory processFactory){EnvironmentInfo = environment;- FileSystem = fileSystem;_logger = logger;ProcessFactory = processFactory;diff --git a/Emby.Photos/PhotoProvider.cs b/Emby.Photos/PhotoProvider.csindex f3457d1055..a4179e6609 100644--- a/Emby.Photos/PhotoProvider.cs+++ b/Emby.Photos/PhotoProvider.cs@@ -9,7 +9,6 @@ using MediaBrowser.Controller.Library;using MediaBrowser.Controller.Providers;using MediaBrowser.Model.Drawing;using MediaBrowser.Model.Entities;-using MediaBrowser.Model.IO;using Microsoft.Extensions.Logging;using TagLib;using TagLib.IFD;@@ -21,13 +20,11 @@ namespace Emby.Photospublic class PhotoProvider : ICustomMetadataProvider<Photo>, IForcedProvider, IHasItemChangeMonitor{private readonly ILogger _logger;- private readonly IFileSystem _fileSystem;private IImageProcessor _imageProcessor;- public PhotoProvider(ILogger logger, IFileSystem fileSystem, IImageProcessor imageProcessor)+ public PhotoProvider(ILogger logger, IImageProcessor imageProcessor){_logger = logger;- _fileSystem = fileSystem;_imageProcessor = imageProcessor;}diff --git a/Emby.Server.Implementations/AppBase/BaseConfigurationManager.cs b/Emby.Server.Implementations/AppBase/BaseConfigurationManager.csindex 460809e936..d7fa4d4c20 100644--- a/Emby.Server.Implementations/AppBase/BaseConfigurationManager.cs+++ b/Emby.Server.Implementations/AppBase/BaseConfigurationManager.cs@@ -79,7 +79,7 @@ namespace Emby.Server.Implementations.AppBaseget{// Lazy load- LazyInitializer.EnsureInitialized(ref _configuration, ref _configurationLoaded, ref _configurationSyncLock, () => (BaseApplicationConfiguration)ConfigurationHelper.GetXmlConfiguration(ConfigurationType, CommonApplicationPaths.SystemConfigurationFilePath, XmlSerializer, FileSystem));+ LazyInitializer.EnsureInitialized(ref _configuration, ref _configurationLoaded, ref _configurationSyncLock, () => (BaseApplicationConfiguration)ConfigurationHelper.GetXmlConfiguration(ConfigurationType, CommonApplicationPaths.SystemConfigurationFilePath, XmlSerializer));return _configuration;}protected setdiff --git a/Emby.Server.Implementations/AppBase/ConfigurationHelper.cs b/Emby.Server.Implementations/AppBase/ConfigurationHelper.csindex 3faad76e7d..90b97061f3 100644--- a/Emby.Server.Implementations/AppBase/ConfigurationHelper.cs+++ b/Emby.Server.Implementations/AppBase/ConfigurationHelper.cs@@ -1,7 +1,6 @@using System;using System.IO;using System.Linq;-using MediaBrowser.Model.IO;using MediaBrowser.Model.Serialization;namespace Emby.Server.Implementations.AppBase@@ -18,9 +17,8 @@ namespace Emby.Server.Implementations.AppBase/// <param name="type">The type.</param>/// <param name="path">The path.</param>/// <param name="xmlSerializer">The XML serializer.</param>- /// <param name="fileSystem">The file system</param>/// <returns>System.Object.</returns>- public static object GetXmlConfiguration(Type type, string path, IXmlSerializer xmlSerializer, IFileSystem fileSystem)+ public static object GetXmlConfiguration(Type type, string path, IXmlSerializer xmlSerializer){object configuration;diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.csindex bb475eb2c7..5c7133d058 100644--- a/Emby.Server.Implementations/ApplicationHost.cs+++ b/Emby.Server.Implementations/ApplicationHost.cs@@ -440,7 +440,7 @@ namespace Emby.Server.Implementations{if (_deviceId == null){- _deviceId = new DeviceId(ApplicationPaths, LoggerFactory, FileSystemManager);+ _deviceId = new DeviceId(ApplicationPaths, LoggerFactory);}return _deviceId.Value;@@ -780,7 +780,7 @@ namespace Emby.Server.ImplementationsInstallationManager = new InstallationManager(LoggerFactory, this, ApplicationPaths, HttpClient, JsonSerializer, ServerConfigurationManager, FileSystemManager, CryptographyProvider, PackageRuntime);RegisterSingleInstance(InstallationManager);- ZipClient = new ZipClient(FileSystemManager);+ ZipClient = new ZipClient();RegisterSingleInstance(ZipClient);HttpResultFactory = new HttpResultFactory(LoggerFactory, FileSystemManager, JsonSerializer, CreateBrotliCompressor());@@ -820,7 +820,7 @@ namespace Emby.Server.ImplementationsAuthenticationRepository = GetAuthenticationRepository();RegisterSingleInstance(AuthenticationRepository);- UserManager = new UserManager(LoggerFactory, ServerConfigurationManager, UserRepository, XmlSerializer, NetworkManager, () => ImageProcessor, () => DtoService, this, JsonSerializer, FileSystemManager, CryptographyProvider);+ UserManager = new UserManager(LoggerFactory, ServerConfigurationManager, UserRepository, XmlSerializer, NetworkManager, () => ImageProcessor, () => DtoService, this, JsonSerializer, FileSystemManager);RegisterSingleInstance(UserManager);LibraryManager = new LibraryManager(this, LoggerFactory, TaskManager, UserManager, ServerConfigurationManager, UserDataManager, () => LibraryMonitor, FileSystemManager, () => ProviderManager, () => UserViewManager);@@ -830,7 +830,7 @@ namespace Emby.Server.Implementationsvar musicManager = new MusicManager(LibraryManager);RegisterSingleInstance<IMusicManager>(new MusicManager(LibraryManager));- LibraryMonitor = new LibraryMonitor(LoggerFactory, TaskManager, LibraryManager, ServerConfigurationManager, FileSystemManager, EnvironmentInfo);+ LibraryMonitor = new LibraryMonitor(LoggerFactory, LibraryManager, ServerConfigurationManager, FileSystemManager, EnvironmentInfo);RegisterSingleInstance(LibraryMonitor);RegisterSingleInstance<ISearchEngine>(() => new SearchEngine(LoggerFactory, LibraryManager, UserManager));@@ -859,7 +859,7 @@ namespace Emby.Server.Implementationsvar encryptionManager = new EncryptionManager();RegisterSingleInstance<IEncryptionManager>(encryptionManager);- DeviceManager = new DeviceManager(AuthenticationRepository, JsonSerializer, LibraryManager, LocalizationManager, UserManager, FileSystemManager, LibraryMonitor, ServerConfigurationManager, LoggerFactory, NetworkManager);+ DeviceManager = new DeviceManager(AuthenticationRepository, JsonSerializer, LibraryManager, LocalizationManager, UserManager, FileSystemManager, LibraryMonitor, ServerConfigurationManager);RegisterSingleInstance(DeviceManager);MediaSourceManager = new MediaSourceManager(ItemRepository, ApplicationPaths, LocalizationManager, UserManager, LibraryManager, LoggerFactory, JsonSerializer, FileSystemManager, UserDataManager, () => MediaEncoder);@@ -871,7 +871,7 @@ namespace Emby.Server.ImplementationsProviderManager = new ProviderManager(HttpClient, SubtitleManager, ServerConfigurationManager, LibraryMonitor, LoggerFactory, FileSystemManager, ApplicationPaths, () => LibraryManager, JsonSerializer);RegisterSingleInstance(ProviderManager);- DtoService = new DtoService(LoggerFactory, LibraryManager, UserDataManager, ItemRepository, ImageProcessor, ServerConfigurationManager, FileSystemManager, ProviderManager, () => ChannelManager, this, () => DeviceManager, () => MediaSourceManager, () => LiveTvManager);+ DtoService = new DtoService(LoggerFactory, LibraryManager, UserDataManager, ItemRepository, ImageProcessor, ProviderManager, this, () => MediaSourceManager, () => LiveTvManager);RegisterSingleInstance(DtoService);ChannelManager = new ChannelManager(UserManager, DtoService, LibraryManager, LoggerFactory, ServerConfigurationManager, FileSystemManager, UserDataManager, JsonSerializer, LocalizationManager, HttpClient, ProviderManager);@@ -1058,7 +1058,7 @@ namespace Emby.Server.Implementationsprotected virtual FFMpegInfo GetFFMpegInfo(){- return new FFMpegLoader(Logger, ApplicationPaths, HttpClient, ZipClient, FileSystemManager, GetFfmpegInstallInfo())+ return new FFMpegLoader(ApplicationPaths, FileSystemManager, GetFfmpegInstallInfo()).GetFFMpegInfo(StartupOptions);}diff --git a/Emby.Server.Implementations/Archiving/ZipClient.cs b/Emby.Server.Implementations/Archiving/ZipClient.csindex 1135cf694d..6b0fd2dc6c 100644--- a/Emby.Server.Implementations/Archiving/ZipClient.cs+++ b/Emby.Server.Implementations/Archiving/ZipClient.cs@@ -14,11 +14,9 @@ namespace Emby.Server.Implementations.Archiving/// </summary>public class ZipClient : IZipClient{- private readonly IFileSystem _fileSystem;-- public ZipClient(IFileSystem fileSystem)+ public ZipClient(){- _fileSystem = fileSystem;+}/// <summary>diff --git a/Emby.Server.Implementations/Collections/CollectionImageProvider.cs b/Emby.Server.Implementations/Collections/CollectionImageProvider.csindex 6aeadda2fb..cdfb5cadf1 100644--- a/Emby.Server.Implementations/Collections/CollectionImageProvider.cs+++ b/Emby.Server.Implementations/Collections/CollectionImageProvider.cs@@ -10,14 +10,18 @@ using MediaBrowser.Controller.Entities.Movies;using MediaBrowser.Controller.Entities.TV;using MediaBrowser.Controller.Providers;using MediaBrowser.Model.Entities;-using MediaBrowser.Model.Extensions;using MediaBrowser.Model.IO;namespace Emby.Server.Implementations.Collections{public class CollectionImageProvider : BaseDynamicImageProvider<BoxSet>{- public CollectionImageProvider(IFileSystem fileSystem, IProviderManager providerManager, IApplicationPaths applicationPaths, IImageProcessor imageProcessor) : base(fileSystem, providerManager, applicationPaths, imageProcessor)+ public CollectionImageProvider(+ IFileSystem fileSystem,+ IProviderManager providerManager,+ IApplicationPaths applicationPaths,+ IImageProcessor imageProcessor)+ : base(fileSystem, providerManager, applicationPaths, imageProcessor){}diff --git a/Emby.Server.Implementations/Collections/CollectionManager.cs b/Emby.Server.Implementations/Collections/CollectionManager.csindex 812e48a1f8..2b99e0ddfc 100644--- a/Emby.Server.Implementations/Collections/CollectionManager.cs+++ b/Emby.Server.Implementations/Collections/CollectionManager.cs@@ -342,14 +342,12 @@ namespace Emby.Server.Implementations.Collections{private readonly CollectionManager _collectionManager;private readonly IServerConfigurationManager _config;- private readonly IFileSystem _fileSystem;private ILogger _logger;- public CollectionManagerEntryPoint(ICollectionManager collectionManager, IServerConfigurationManager config, IFileSystem fileSystem, ILogger logger)+ public CollectionManagerEntryPoint(ICollectionManager collectionManager, IServerConfigurationManager config, ILogger logger){_collectionManager = (CollectionManager)collectionManager;_config = config;- _fileSystem = fileSystem;_logger = logger;}diff --git a/Emby.Server.Implementations/Data/CleanDatabaseScheduledTask.cs b/Emby.Server.Implementations/Data/CleanDatabaseScheduledTask.csindex dcfe149434..f7743a3c25 100644--- a/Emby.Server.Implementations/Data/CleanDatabaseScheduledTask.cs+++ b/Emby.Server.Implementations/Data/CleanDatabaseScheduledTask.cs@@ -1,11 +1,8 @@using System;using System.Threading;using System.Threading.Tasks;-using MediaBrowser.Common.Configuration;using MediaBrowser.Controller.Entities;using MediaBrowser.Controller.Library;-using MediaBrowser.Controller.Persistence;-using MediaBrowser.Model.IO;using Microsoft.Extensions.Logging;namespace Emby.Server.Implementations.Data@@ -13,18 +10,12 @@ namespace Emby.Server.Implementations.Datapublic class CleanDatabaseScheduledTask : ILibraryPostScanTask{private readonly ILibraryManager _libraryManager;- private readonly IItemRepository _itemRepo;private readonly ILogger _logger;- private readonly IFileSystem _fileSystem;- private readonly IApplicationPaths _appPaths;- public CleanDatabaseScheduledTask(ILibraryManager libraryManager, IItemRepository itemRepo, ILogger logger, IFileSystem fileSystem, IApplicationPaths appPaths)+ public CleanDatabaseScheduledTask(ILibraryManager libraryManager, ILogger logger){_libraryManager = libraryManager;- _itemRepo = itemRepo;_logger = logger;- _fileSystem = fileSystem;- _appPaths = appPaths;}public Task Run(IProgress<double> progress, CancellationToken cancellationToken)diff --git a/Emby.Server.Implementations/Devices/DeviceId.cs b/Emby.Server.Implementations/Devices/DeviceId.csindex 866bd137ff..495c3436ab 100644--- a/Emby.Server.Implementations/Devices/DeviceId.cs+++ b/Emby.Server.Implementations/Devices/DeviceId.cs@@ -11,7 +11,6 @@ namespace Emby.Server.Implementations.Devices{private readonly IApplicationPaths _appPaths;private readonly ILogger _logger;- private readonly IFileSystem _fileSystem;private readonly object _syncLock = new object();@@ -86,19 +85,10 @@ namespace Emby.Server.Implementations.Devicesprivate string _id;- public DeviceId(- IApplicationPaths appPaths,- ILoggerFactory loggerFactory,- IFileSystem fileSystem)+ public DeviceId(IApplicationPaths appPaths, ILoggerFactory loggerFactory){- if (fileSystem == null)- {- throw new ArgumentNullException(nameof(fileSystem));- }-_appPaths = appPaths;_logger = loggerFactory.CreateLogger("SystemId");- _fileSystem = fileSystem;}public string Value => _id ?? (_id = GetDeviceId());diff --git a/Emby.Server.Implementations/Devices/DeviceManager.cs b/Emby.Server.Implementations/Devices/DeviceManager.csindex ec3649bcac..7d6529a675 100644--- a/Emby.Server.Implementations/Devices/DeviceManager.cs+++ b/Emby.Server.Implementations/Devices/DeviceManager.cs@@ -34,8 +34,6 @@ namespace Emby.Server.Implementations.Devicesprivate readonly IFileSystem _fileSystem;private readonly ILibraryMonitor _libraryMonitor;private readonly IServerConfigurationManager _config;- private readonly ILogger _logger;- private readonly INetworkManager _network;private readonly ILibraryManager _libraryManager;private readonly ILocalizationManager _localizationManager;@@ -55,17 +53,13 @@ namespace Emby.Server.Implementations.DevicesIUserManager userManager,IFileSystem fileSystem,ILibraryMonitor libraryMonitor,- IServerConfigurationManager config,- ILoggerFactory loggerFactory,- INetworkManager network)+ IServerConfigurationManager config){_json = json;_userManager = userManager;_fileSystem = fileSystem;_libraryMonitor = libraryMonitor;_config = config;- _logger = loggerFactory.CreateLogger(nameof(DeviceManager));- _network = network;_libraryManager = libraryManager;_localizationManager = localizationManager;_authRepo = authRepo;@@ -414,14 +408,12 @@ namespace Emby.Server.Implementations.Devices{private readonly DeviceManager _deviceManager;private readonly IServerConfigurationManager _config;- private readonly IFileSystem _fileSystem;private ILogger _logger;- public DeviceManagerEntryPoint(IDeviceManager deviceManager, IServerConfigurationManager config, IFileSystem fileSystem, ILogger logger)+ public DeviceManagerEntryPoint(IDeviceManager deviceManager, IServerConfigurationManager config, ILogger logger){_deviceManager = (DeviceManager)deviceManager;_config = config;- _fileSystem = fileSystem;_logger = logger;}diff --git a/Emby.Server.Implementations/Dto/DtoService.cs b/Emby.Server.Implementations/Dto/DtoService.csindex 983eb51e63..2233d3d40c 100644--- a/Emby.Server.Implementations/Dto/DtoService.cs+++ b/Emby.Server.Implementations/Dto/DtoService.cs@@ -36,13 +36,9 @@ namespace Emby.Server.Implementations.Dtoprivate readonly IItemRepository _itemRepo;private readonly IImageProcessor _imageProcessor;- private readonly IServerConfigurationManager _config;- private readonly IFileSystem _fileSystem;private readonly IProviderManager _providerManager;- private readonly Func<IChannelManager> _channelManagerFactory;private readonly IApplicationHost _appHost;- private readonly Func<IDeviceManager> _deviceManager;private readonly Func<IMediaSourceManager> _mediaSourceManager;private readonly Func<ILiveTvManager> _livetvManager;@@ -52,12 +48,8 @@ namespace Emby.Server.Implementations.DtoIUserDataManager userDataRepository,IItemRepository itemRepo,IImageProcessor imageProcessor,- IServerConfigurationManager config,- IFileSystem fileSystem,IProviderManager providerManager,- Func<IChannelManager> channelManagerFactory,IApplicationHost appHost,- Func<IDeviceManager> deviceManager,Func<IMediaSourceManager> mediaSourceManager,Func<ILiveTvManager> livetvManager){@@ -66,12 +58,8 @@ namespace Emby.Server.Implementations.Dto_userDataRepository = userDataRepository;_itemRepo = itemRepo;_imageProcessor = imageProcessor;- _config = config;- _fileSystem = fileSystem;_providerManager = providerManager;- _channelManagerFactory = channelManagerFactory;_appHost = appHost;- _deviceManager = deviceManager;_mediaSourceManager = mediaSourceManager;_livetvManager = livetvManager;}diff --git a/Emby.Server.Implementations/FFMpeg/FFMpegLoader.cs b/Emby.Server.Implementations/FFMpeg/FFMpegLoader.csindex 6167d1eaa4..bbf51dd246 100644--- a/Emby.Server.Implementations/FFMpeg/FFMpegLoader.cs+++ b/Emby.Server.Implementations/FFMpeg/FFMpegLoader.cs@@ -3,27 +3,19 @@ using System.Collections.Generic;using System.IO;using System.Linq;using MediaBrowser.Common.Configuration;-using MediaBrowser.Common.Net;using MediaBrowser.Model.IO;-using Microsoft.Extensions.Logging;namespace Emby.Server.Implementations.FFMpeg{public class FFMpegLoader{- private readonly IHttpClient _httpClient;private readonly IApplicationPaths _appPaths;- private readonly ILogger _logger;- private readonly IZipClient _zipClient;private readonly IFileSystem _fileSystem;private readonly FFMpegInstallInfo _ffmpegInstallInfo;- public FFMpegLoader(ILogger logger, IApplicationPaths appPaths, IHttpClient httpClient, IZipClient zipClient, IFileSystem fileSystem, FFMpegInstallInfo ffmpegInstallInfo)+ public FFMpegLoader(IApplicationPaths appPaths, IFileSystem fileSystem, FFMpegInstallInfo ffmpegInstallInfo){- _logger = logger;_appPaths = appPaths;- _httpClient = httpClient;- _zipClient = zipClient;_fileSystem = fileSystem;_ffmpegInstallInfo = ffmpegInstallInfo;}@@ -115,8 +107,7 @@ namespace Emby.Server.Implementations.FFMpegvar encoderFilename = Path.GetFileName(info.EncoderPath);var probeFilename = Path.GetFileName(info.ProbePath);- foreach (var directory in _fileSystem.GetDirectoryPaths(rootEncoderPath)- .ToList())+ foreach (var directory in _fileSystem.GetDirectoryPaths(rootEncoderPath)){var allFiles = _fileSystem.GetFilePaths(directory, true).ToList();diff --git a/Emby.Server.Implementations/IO/FileRefresher.cs b/Emby.Server.Implementations/IO/FileRefresher.csindex 3668f6a7ab..73242d0ade 100644--- a/Emby.Server.Implementations/IO/FileRefresher.cs+++ b/Emby.Server.Implementations/IO/FileRefresher.cs@@ -17,31 +17,23 @@ namespace Emby.Server.Implementations.IOpublic class FileRefresher : IDisposable{private ILogger Logger { get; set; }- private ITaskManager TaskManager { get; set; }private ILibraryManager LibraryManager { get; set; }private IServerConfigurationManager ConfigurationManager { get; set; }- private readonly IFileSystem _fileSystem;private readonly List<string> _affectedPaths = new List<string>();private Timer _timer;private readonly object _timerLock = new object();public string Path { get; private set; }public event EventHandler<EventArgs> Completed;- private readonly IEnvironmentInfo _environmentInfo;- private readonly ILibraryManager _libraryManager;- public FileRefresher(string path, IFileSystem fileSystem, IServerConfigurationManager configurationManager, ILibraryManager libraryManager, ITaskManager taskManager, ILogger logger, IEnvironmentInfo environmentInfo, ILibraryManager libraryManager1)+ public FileRefresher(string path, IServerConfigurationManager configurationManager, ILibraryManager libraryManager, ILogger logger){logger.LogDebug("New file refresher created for {0}", path);Path = path;- _fileSystem = fileSystem;ConfigurationManager = configurationManager;LibraryManager = libraryManager;- TaskManager = taskManager;Logger = logger;- _environmentInfo = environmentInfo;- _libraryManager = libraryManager1;AddPath(path);}diff --git a/Emby.Server.Implementations/IO/LibraryMonitor.cs b/Emby.Server.Implementations/IO/LibraryMonitor.csindex 607a4d333f..d473425115 100644--- a/Emby.Server.Implementations/IO/LibraryMonitor.cs+++ b/Emby.Server.Implementations/IO/LibraryMonitor.cs@@ -34,7 +34,7 @@ namespace Emby.Server.Implementations.IO/// <summary>/// Any file name ending in any of these will be ignored by the watchers/// </summary>- private readonly HashSet<string> _alwaysIgnoreFiles = new HashSet<string>(StringComparer.OrdinalIgnoreCase)+ private static readonly HashSet<string> _alwaysIgnoreFiles = new HashSet<string>(StringComparer.OrdinalIgnoreCase){"small.jpg","albumart.jpg",@@ -44,7 +44,7 @@ namespace Emby.Server.Implementations.IO"TempSBE"};- private readonly string[] _alwaysIgnoreSubstrings = new string[]+ private static readonly string[] _alwaysIgnoreSubstrings = new string[]{// Synology"eaDir",@@ -53,7 +53,7 @@ namespace Emby.Server.Implementations.IO".actors"};- private readonly HashSet<string> _alwaysIgnoreExtensions = new HashSet<string>(StringComparer.OrdinalIgnoreCase)+ private static readonly HashSet<string> _alwaysIgnoreExtensions = new HashSet<string>(StringComparer.OrdinalIgnoreCase){// thumbs.db".db",@@ -123,12 +123,6 @@ namespace Emby.Server.Implementations.IO/// <value>The logger.</value>private ILogger Logger { get; set; }- /// <summary>- /// Gets or sets the task manager.- /// </summary>- /// <value>The task manager.</value>- private ITaskManager TaskManager { get; set; }-private ILibraryManager LibraryManager { get; set; }private IServerConfigurationManager ConfigurationManager { get; set; }@@ -140,19 +134,12 @@ namespace Emby.Server.Implementations.IO/// </summary>public LibraryMonitor(ILoggerFactory loggerFactory,- ITaskManager taskManager,ILibraryManager libraryManager,IServerConfigurationManager configurationManager,IFileSystem fileSystem,IEnvironmentInfo environmentInfo){- if (taskManager == null)- {- throw new ArgumentNullException(nameof(taskManager));- }-LibraryManager = libraryManager;- TaskManager = taskManager;Logger = loggerFactory.CreateLogger(GetType().Name);ConfigurationManager = configurationManager;_fileSystem = fileSystem;@@ -541,7 +528,7 @@ namespace Emby.Server.Implementations.IO}}- var newRefresher = new FileRefresher(path, _fileSystem, ConfigurationManager, LibraryManager, TaskManager, Logger, _environmentInfo, LibraryManager);+ var newRefresher = new FileRefresher(path, ConfigurationManager, LibraryManager, Logger);newRefresher.Completed += NewRefresher_Completed;_activeRefreshers.Add(newRefresher);}diff --git a/Emby.Server.Implementations/Library/CoreResolutionIgnoreRule.cs b/Emby.Server.Implementations/Library/CoreResolutionIgnoreRule.csindex 80f746c7a9..c644d13eab 100644--- a/Emby.Server.Implementations/Library/CoreResolutionIgnoreRule.cs+++ b/Emby.Server.Implementations/Library/CoreResolutionIgnoreRule.cs@@ -1,5 +1,4 @@using System;-using System.Collections.Generic;using System.IO;using System.Linq;using MediaBrowser.Controller.Entities;@@ -7,7 +6,6 @@ using MediaBrowser.Controller.Library;using MediaBrowser.Controller.Resolvers;using MediaBrowser.Model.Extensions;using MediaBrowser.Model.IO;-using Microsoft.Extensions.Logging;namespace Emby.Server.Implementations.Library{@@ -16,16 +14,14 @@ namespace Emby.Server.Implementations.Library/// </summary>public class CoreResolutionIgnoreRule : IResolverIgnoreRule{- private readonly IFileSystem _fileSystem;private readonly ILibraryManager _libraryManager;- private readonly ILogger _logger;private bool _ignoreDotPrefix;/// <summary>/// Any folder named in this list will be ignored - can be added to at runtime for extensibility/// </summary>- public static readonly Dictionary<string, string> IgnoreFolders = new List<string>+ public static readonly string[] IgnoreFolders ={"metadata","ps3_update",@@ -50,13 +46,11 @@ namespace Emby.Server.Implementations.Library// macos".AppleDouble"- }.ToDictionary(i => i, StringComparer.OrdinalIgnoreCase);+ };- public CoreResolutionIgnoreRule(IFileSystem fileSystem, ILibraryManager libraryManager, ILogger logger)+ public CoreResolutionIgnoreRule(ILibraryManager libraryManager){- _fileSystem = fileSystem;_libraryManager = libraryManager;- _logger = logger;_ignoreDotPrefix = Environment.OSVersion.Platform != PlatformID.Win32NT;}@@ -117,7 +111,7 @@ namespace Emby.Server.Implementations.Libraryif (fileInfo.IsDirectory){// Ignore any folders in our list- if (IgnoreFolders.ContainsKey(filename))+ if (IgnoreFolders.Contains(filename, StringComparer.OrdinalIgnoreCase)){return true;}diff --git a/Emby.Server.Implementations/Library/LibraryManager.cs b/Emby.Server.Implementations/Library/LibraryManager.csindex 064006ebd6..87809cae86 100644--- a/Emby.Server.Implementations/Library/LibraryManager.cs+++ b/Emby.Server.Implementations/Library/LibraryManager.cs@@ -986,7 +986,7 @@ namespace Emby.Server.Implementations.Library// Ensure the location is available.Directory.CreateDirectory(ConfigurationManager.ApplicationPaths.PeoplePath);- return new PeopleValidator(this, _logger, ConfigurationManager, _fileSystem).ValidatePeople(cancellationToken, progress);+ return new PeopleValidator(this, _logger, _fileSystem).ValidatePeople(cancellationToken, progress);}/// <summary>@@ -2543,7 +2543,7 @@ namespace Emby.Server.Implementations.Libraryvar resolvers = new IItemResolver[]{- new GenericVideoResolver<Trailer>(this, _fileSystem)+ new GenericVideoResolver<Trailer>(this)};return ResolvePaths(files, directoryService, null, new LibraryOptions(), null, resolvers)diff --git a/Emby.Server.Implementations/Library/Resolvers/BaseVideoResolver.cs b/Emby.Server.Implementations/Library/Resolvers/BaseVideoResolver.csindex d992f8d030..541b13cbe1 100644--- a/Emby.Server.Implementations/Library/Resolvers/BaseVideoResolver.cs+++ b/Emby.Server.Implementations/Library/Resolvers/BaseVideoResolver.cs@@ -6,7 +6,6 @@ using MediaBrowser.Controller.Entities;using MediaBrowser.Controller.Library;using MediaBrowser.Controller.Providers;using MediaBrowser.Model.Entities;-using MediaBrowser.Model.IO;namespace Emby.Server.Implementations.Library.Resolvers{@@ -18,11 +17,9 @@ namespace Emby.Server.Implementations.Library.Resolverswhere T : Video, new(){protected readonly ILibraryManager LibraryManager;- protected readonly IFileSystem FileSystem;- protected BaseVideoResolver(ILibraryManager libraryManager, IFileSystem fileSystem)+ protected BaseVideoResolver(ILibraryManager libraryManager){- FileSystem = fileSystem;LibraryManager = libraryManager;}diff --git a/Emby.Server.Implementations/Library/Resolvers/Movies/MovieResolver.cs b/Emby.Server.Implementations/Library/Resolvers/Movies/MovieResolver.csindex 472a3f105c..8485636794 100644--- a/Emby.Server.Implementations/Library/Resolvers/Movies/MovieResolver.cs+++ b/Emby.Server.Implementations/Library/Resolvers/Movies/MovieResolver.cs@@ -548,7 +548,8 @@ namespace Emby.Server.Implementations.Library.Resolvers.Moviesprivate IImageProcessor _imageProcessor;- public MovieResolver(ILibraryManager libraryManager, IFileSystem fileSystem, IImageProcessor imageProcessor) : base(libraryManager, fileSystem)+ public MovieResolver(ILibraryManager libraryManager, IImageProcessor imageProcessor)+ : base(libraryManager){_imageProcessor = imageProcessor;}diff --git a/Emby.Server.Implementations/Library/Resolvers/PhotoResolver.cs b/Emby.Server.Implementations/Library/Resolvers/PhotoResolver.csindex a3298c5803..db270c398b 100644--- a/Emby.Server.Implementations/Library/Resolvers/PhotoResolver.cs+++ b/Emby.Server.Implementations/Library/Resolvers/PhotoResolver.cs@@ -7,7 +7,6 @@ using MediaBrowser.Controller.Entities;using MediaBrowser.Controller.Library;using MediaBrowser.Model.Configuration;using MediaBrowser.Model.Entities;-using MediaBrowser.Model.IO;namespace Emby.Server.Implementations.Library.Resolvers{@@ -15,13 +14,11 @@ namespace Emby.Server.Implementations.Library.Resolvers{private readonly IImageProcessor _imageProcessor;private readonly ILibraryManager _libraryManager;- private readonly IFileSystem _fileSystem;- public PhotoResolver(IImageProcessor imageProcessor, ILibraryManager libraryManager, IFileSystem fileSystem)+ public PhotoResolver(IImageProcessor imageProcessor, ILibraryManager libraryManager){_imageProcessor = imageProcessor;_libraryManager = libraryManager;- _fileSystem = fileSystem;}/// <summary>@@ -113,8 +110,7 @@ namespace Emby.Server.Implementations.Library.Resolversreturn false;}- return imageProcessor.SupportedInputFormats.Contains((Path.GetExtension(path) ?? string.Empty).TrimStart('.'));+ return imageProcessor.SupportedInputFormats.Contains(Path.GetExtension(path).TrimStart('.'), StringComparer.Ordinal);}-}}diff --git a/Emby.Server.Implementations/Library/Resolvers/TV/EpisodeResolver.cs b/Emby.Server.Implementations/Library/Resolvers/TV/EpisodeResolver.csindex fed0904d19..a6d18c9b5a 100644--- a/Emby.Server.Implementations/Library/Resolvers/TV/EpisodeResolver.cs+++ b/Emby.Server.Implementations/Library/Resolvers/TV/EpisodeResolver.cs@@ -3,7 +3,6 @@ using System.Linq;using MediaBrowser.Controller.Entities.TV;using MediaBrowser.Controller.Library;using MediaBrowser.Model.Entities;-using MediaBrowser.Model.IO;namespace Emby.Server.Implementations.Library.Resolvers.TV{@@ -74,7 +73,8 @@ namespace Emby.Server.Implementations.Library.Resolvers.TVreturn null;}- public EpisodeResolver(ILibraryManager libraryManager, IFileSystem fileSystem) : base(libraryManager, fileSystem)+ public EpisodeResolver(ILibraryManager libraryManager)+ : base(libraryManager){}}diff --git a/Emby.Server.Implementations/Library/Resolvers/VideoResolver.cs b/Emby.Server.Implementations/Library/Resolvers/VideoResolver.csindex 60752a85db..68d5d8b2de 100644--- a/Emby.Server.Implementations/Library/Resolvers/VideoResolver.cs+++ b/Emby.Server.Implementations/Library/Resolvers/VideoResolver.cs@@ -1,13 +1,13 @@using MediaBrowser.Controller.Entities;using MediaBrowser.Controller.Library;-using MediaBrowser.Model.IO;namespace Emby.Server.Implementations.Library.Resolvers{public class GenericVideoResolver<T> : BaseVideoResolver<T>where T : Video, new(){- public GenericVideoResolver(ILibraryManager libraryManager, IFileSystem fileSystem) : base(libraryManager, fileSystem)+ public GenericVideoResolver(ILibraryManager libraryManager)+ : base(libraryManager){}}diff --git a/Emby.Server.Implementations/Library/UserManager.cs b/Emby.Server.Implementations/Library/UserManager.csindex 3ff84382f2..15cbbdb5ae 100644--- a/Emby.Server.Implementations/Library/UserManager.cs+++ b/Emby.Server.Implementations/Library/UserManager.cs@@ -74,7 +74,6 @@ namespace Emby.Server.Implementations.Libraryprivate readonly Func<IDtoService> _dtoServiceFactory;private readonly IServerApplicationHost _appHost;private readonly IFileSystem _fileSystem;- private readonly ICryptoProvider _cryptographyProvider;private IAuthenticationProvider[] _authenticationProviders;private DefaultAuthenticationProvider _defaultAuthenticationProvider;@@ -89,8 +88,7 @@ namespace Emby.Server.Implementations.LibraryFunc<IDtoService> dtoServiceFactory,IServerApplicationHost appHost,IJsonSerializer jsonSerializer,- IFileSystem fileSystem,- ICryptoProvider cryptographyProvider)+ IFileSystem fileSystem){_logger = loggerFactory.CreateLogger(nameof(UserManager));UserRepository = userRepository;@@ -101,7 +99,6 @@ namespace Emby.Server.Implementations.Library_appHost = appHost;_jsonSerializer = jsonSerializer;_fileSystem = fileSystem;- _cryptographyProvider = cryptographyProvider;ConfigurationManager = configurationManager;_users = Array.Empty<User>();diff --git a/Emby.Server.Implementations/Library/Validators/PeopleValidator.cs b/Emby.Server.Implementations/Library/Validators/PeopleValidator.csindex 0ea543ba01..7899cf01b3 100644--- a/Emby.Server.Implementations/Library/Validators/PeopleValidator.cs+++ b/Emby.Server.Implementations/Library/Validators/PeopleValidator.cs@@ -24,7 +24,6 @@ namespace Emby.Server.Implementations.Library.Validators/// </summary>private readonly ILogger _logger;- private readonly IServerConfigurationManager _config;private readonly IFileSystem _fileSystem;/// <summary>@@ -32,11 +31,10 @@ namespace Emby.Server.Implementations.Library.Validators/// </summary>/// <param name="libraryManager">The library manager.</param>/// <param name="logger">The logger.</param>- public PeopleValidator(ILibraryManager libraryManager, ILogger logger, IServerConfigurationManager config, IFileSystem fileSystem)+ public PeopleValidator(ILibraryManager libraryManager, ILogger logger, IFileSystem fileSystem){_libraryManager = libraryManager;_logger = logger;- _config = config;_fileSystem = fileSystem;}diff --git a/Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs b/Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.csindex 84ca130b76..fceb82ba19 100644--- a/Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs+++ b/Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs@@ -105,8 +105,8 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV_mediaSourceManager = mediaSourceManager;_streamHelper = streamHelper;- _seriesTimerProvider = new SeriesTimerManager(fileSystem, jsonSerializer, _logger, Path.Combine(DataPath, "seriestimers"));- _timerProvider = new TimerManager(fileSystem, jsonSerializer, _logger, Path.Combine(DataPath, "timers"), _logger);+ _seriesTimerProvider = new SeriesTimerManager(jsonSerializer, _logger, Path.Combine(DataPath, "seriestimers"));+ _timerProvider = new TimerManager(jsonSerializer, _logger, Path.Combine(DataPath, "timers"), _logger);_timerProvider.TimerFired += _timerProvider_TimerFired;_config.NamedConfigurationUpdated += _config_NamedConfigurationUpdated;@@ -1708,7 +1708,7 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV{if (mediaSource.RequiresLooping || !(mediaSource.Container ?? string.Empty).EndsWith("ts", StringComparison.OrdinalIgnoreCase) || (mediaSource.Protocol != MediaProtocol.File && mediaSource.Protocol != MediaProtocol.Http)){- return new EncodedRecorder(_logger, _fileSystem, _mediaEncoder, _config.ApplicationPaths, _jsonSerializer, _httpClient, _processFactory, _config, _assemblyInfo);+ return new EncodedRecorder(_logger, _fileSystem, _mediaEncoder, _config.ApplicationPaths, _jsonSerializer, _processFactory, _config);}return new DirectRecorder(_logger, _httpClient, _fileSystem, _streamHelper);diff --git a/Emby.Server.Implementations/LiveTv/EmbyTV/EncodedRecorder.cs b/Emby.Server.Implementations/LiveTv/EmbyTV/EncodedRecorder.csindex eed2395141..9a9bae2151 100644--- a/Emby.Server.Implementations/LiveTv/EmbyTV/EncodedRecorder.cs+++ b/Emby.Server.Implementations/LiveTv/EmbyTV/EncodedRecorder.cs@@ -7,7 +7,6 @@ using System.Text;using System.Threading;using System.Threading.Tasks;using MediaBrowser.Common.Configuration;-using MediaBrowser.Common.Net;using MediaBrowser.Controller;using MediaBrowser.Controller.Configuration;using MediaBrowser.Controller.Library;@@ -17,7 +16,6 @@ using MediaBrowser.Model.Diagnostics;using MediaBrowser.Model.Dto;using MediaBrowser.Model.Entities;using MediaBrowser.Model.IO;-using MediaBrowser.Model.Reflection;using MediaBrowser.Model.Serialization;using Microsoft.Extensions.Logging;@@ -27,7 +25,6 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV{private readonly ILogger _logger;private readonly IFileSystem _fileSystem;- private readonly IHttpClient _httpClient;private readonly IMediaEncoder _mediaEncoder;private readonly IServerApplicationPaths _appPaths;private bool _hasExited;@@ -38,19 +35,23 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTVprivate readonly IJsonSerializer _json;private readonly TaskCompletionSource<bool> _taskCompletionSource = new TaskCompletionSource<bool>();private readonly IServerConfigurationManager _config;- private readonly IAssemblyInfo _assemblyInfo;- public EncodedRecorder(ILogger logger, IFileSystem fileSystem, IMediaEncoder mediaEncoder, IServerApplicationPaths appPaths, IJsonSerializer json, IHttpClient httpClient, IProcessFactory processFactory, IServerConfigurationManager config, IAssemblyInfo assemblyInfo)+ public EncodedRecorder(+ ILogger logger,+ IFileSystem fileSystem,+ IMediaEncoder mediaEncoder,+ IServerApplicationPaths appPaths,+ IJsonSerializer json,+ IProcessFactory processFactory,+ IServerConfigurationManager config){_logger = logger;_fileSystem = fileSystem;_mediaEncoder = mediaEncoder;_appPaths = appPaths;_json = json;- _httpClient = httpClient;_processFactory = processFactory;_config = config;- _assemblyInfo = assemblyInfo;}private static bool CopySubtitles => false;diff --git a/Emby.Server.Implementations/LiveTv/EmbyTV/ItemDataProvider.cs b/Emby.Server.Implementations/LiveTv/EmbyTV/ItemDataProvider.csindex 6b02eaea82..b825ea3b0b 100644--- a/Emby.Server.Implementations/LiveTv/EmbyTV/ItemDataProvider.cs+++ b/Emby.Server.Implementations/LiveTv/EmbyTV/ItemDataProvider.cs@@ -17,15 +17,13 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTVprotected readonly ILogger Logger;private readonly string _dataPath;protected readonly Func<T, T, bool> EqualityComparer;- private readonly IFileSystem _fileSystem;- public ItemDataProvider(IFileSystem fileSystem, IJsonSerializer jsonSerializer, ILogger logger, string dataPath, Func<T, T, bool> equalityComparer)+ public ItemDataProvider(IJsonSerializer jsonSerializer, ILogger logger, string dataPath, Func<T, T, bool> equalityComparer){Logger = logger;_dataPath = dataPath;EqualityComparer = equalityComparer;_jsonSerializer = jsonSerializer;- _fileSystem = fileSystem;}public IReadOnlyList<T> GetAll()diff --git a/Emby.Server.Implementations/LiveTv/EmbyTV/SeriesTimerManager.cs b/Emby.Server.Implementations/LiveTv/EmbyTV/SeriesTimerManager.csindex d2ad65a1e9..520b444041 100644--- a/Emby.Server.Implementations/LiveTv/EmbyTV/SeriesTimerManager.cs+++ b/Emby.Server.Implementations/LiveTv/EmbyTV/SeriesTimerManager.cs@@ -1,6 +1,5 @@using System;using MediaBrowser.Controller.LiveTv;-using MediaBrowser.Model.IO;using MediaBrowser.Model.Serialization;using Microsoft.Extensions.Logging;@@ -8,8 +7,8 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV{public class SeriesTimerManager : ItemDataProvider<SeriesTimerInfo>{- public SeriesTimerManager(IFileSystem fileSystem, IJsonSerializer jsonSerializer, ILogger logger, string dataPath)- : base(fileSystem, jsonSerializer, logger, dataPath, (r1, r2) => string.Equals(r1.Id, r2.Id, StringComparison.OrdinalIgnoreCase))+ public SeriesTimerManager(IJsonSerializer jsonSerializer, ILogger logger, string dataPath)+ : base(jsonSerializer, logger, dataPath, (r1, r2) => string.Equals(r1.Id, r2.Id, StringComparison.OrdinalIgnoreCase)){}diff --git a/Emby.Server.Implementations/LiveTv/EmbyTV/TimerManager.cs b/Emby.Server.Implementations/LiveTv/EmbyTV/TimerManager.csindex 1dcb02f43e..3c807a8ead 100644--- a/Emby.Server.Implementations/LiveTv/EmbyTV/TimerManager.cs+++ b/Emby.Server.Implementations/LiveTv/EmbyTV/TimerManager.cs@@ -5,7 +5,6 @@ using System.Linq;using System.Threading;using MediaBrowser.Controller.LiveTv;using MediaBrowser.Model.Events;-using MediaBrowser.Model.IO;using MediaBrowser.Model.LiveTv;using MediaBrowser.Model.Serialization;using Microsoft.Extensions.Logging;@@ -19,8 +18,8 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTVpublic event EventHandler<GenericEventArgs<TimerInfo>> TimerFired;- public TimerManager(IFileSystem fileSystem, IJsonSerializer jsonSerializer, ILogger logger, string dataPath, ILogger logger1)- : base(fileSystem, jsonSerializer, logger, dataPath, (r1, r2) => string.Equals(r1.Id, r2.Id, StringComparison.OrdinalIgnoreCase))+ public TimerManager(IJsonSerializer jsonSerializer, ILogger logger, string dataPath, ILogger logger1)+ : base(jsonSerializer, logger, dataPath, (r1, r2) => string.Equals(r1.Id, r2.Id, StringComparison.OrdinalIgnoreCase)){_logger = logger1;}diff --git a/Emby.Server.Implementations/LiveTv/TunerHosts/BaseTunerHost.cs b/Emby.Server.Implementations/LiveTv/TunerHosts/BaseTunerHost.csindex 6d1eff187c..715f600a17 100644--- a/Emby.Server.Implementations/LiveTv/TunerHosts/BaseTunerHost.cs+++ b/Emby.Server.Implementations/LiveTv/TunerHosts/BaseTunerHost.cs@@ -9,7 +9,6 @@ using MediaBrowser.Common.Configuration;using MediaBrowser.Controller.Configuration;using MediaBrowser.Controller.Library;using MediaBrowser.Controller.LiveTv;-using MediaBrowser.Controller.MediaEncoding;using MediaBrowser.Model.Dto;using MediaBrowser.Model.IO;using MediaBrowser.Model.LiveTv;@@ -23,18 +22,16 @@ namespace Emby.Server.Implementations.LiveTv.TunerHostsprotected readonly IServerConfigurationManager Config;protected readonly ILogger Logger;protected IJsonSerializer JsonSerializer;- protected readonly IMediaEncoder MediaEncoder;protected readonly IFileSystem FileSystem;private readonly ConcurrentDictionary<string, ChannelCache> _channelCache =new ConcurrentDictionary<string, ChannelCache>(StringComparer.OrdinalIgnoreCase);- protected BaseTunerHost(IServerConfigurationManager config, ILogger logger, IJsonSerializer jsonSerializer, IMediaEncoder mediaEncoder, IFileSystem fileSystem)+ protected BaseTunerHost(IServerConfigurationManager config, ILogger logger, IJsonSerializer jsonSerializer, IFileSystem fileSystem){Config = config;Logger = logger;JsonSerializer = jsonSerializer;- MediaEncoder = mediaEncoder;FileSystem = fileSystem;}diff --git a/Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunHost.cs b/Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunHost.csindex 77b09a83de..24b100eddc 100644--- a/Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunHost.cs+++ b/Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunHost.cs@@ -31,15 +31,22 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts.HdHomerunprivate readonly IServerApplicationHost _appHost;private readonly ISocketFactory _socketFactory;private readonly INetworkManager _networkManager;- private readonly IEnvironmentInfo _environment;- public HdHomerunHost(IServerConfigurationManager config, ILogger logger, IJsonSerializer jsonSerializer, IMediaEncoder mediaEncoder, IFileSystem fileSystem, IHttpClient httpClient, IServerApplicationHost appHost, ISocketFactory socketFactory, INetworkManager networkManager, IEnvironmentInfo environment) : base(config, logger, jsonSerializer, mediaEncoder, fileSystem)+ public HdHomerunHost(+ IServerConfigurationManager config,+ ILogger logger,+ IJsonSerializer jsonSerializer,+ IFileSystem fileSystem,+ IHttpClient httpClient,+ IServerApplicationHost appHost,+ ISocketFactory socketFactory,+ INetworkManager networkManager)+ : base(config, logger, jsonSerializer, fileSystem){_httpClient = httpClient;_appHost = appHost;_socketFactory = socketFactory;_networkManager = networkManager;- _environment = environment;}public string Name => "HD Homerun";diff --git a/Emby.Server.Implementations/LiveTv/TunerHosts/M3UTunerHost.cs b/Emby.Server.Implementations/LiveTv/TunerHosts/M3UTunerHost.csindex 638796e2ef..fdaaf0bae7 100644--- a/Emby.Server.Implementations/LiveTv/TunerHosts/M3UTunerHost.cs+++ b/Emby.Server.Implementations/LiveTv/TunerHosts/M3UTunerHost.cs@@ -26,15 +26,14 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts{private readonly IHttpClient _httpClient;private readonly IServerApplicationHost _appHost;- private readonly IEnvironmentInfo _environment;private readonly INetworkManager _networkManager;private readonly IMediaSourceManager _mediaSourceManager;- public M3UTunerHost(IServerConfigurationManager config, IMediaSourceManager mediaSourceManager, ILogger logger, IJsonSerializer jsonSerializer, IMediaEncoder mediaEncoder, IFileSystem fileSystem, IHttpClient httpClient, IServerApplicationHost appHost, IEnvironmentInfo environment, INetworkManager networkManager) : base(config, logger, jsonSerializer, mediaEncoder, fileSystem)+ public M3UTunerHost(IServerConfigurationManager config, IMediaSourceManager mediaSourceManager, ILogger logger, IJsonSerializer jsonSerializer, IFileSystem fileSystem, IHttpClient httpClient, IServerApplicationHost appHost, INetworkManager networkManager)+ : base(config, logger, jsonSerializer, fileSystem){_httpClient = httpClient;_appHost = appHost;- _environment = environment;_networkManager = networkManager;_mediaSourceManager = mediaSourceManager;}@@ -52,7 +51,7 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts{var channelIdPrefix = GetFullChannelIdPrefix(info);- var result = await new M3uParser(Logger, FileSystem, _httpClient, _appHost).Parse(info.Url, channelIdPrefix, info.Id, cancellationToken).ConfigureAwait(false);+ var result = await new M3uParser(Logger, _httpClient, _appHost).Parse(info.Url, channelIdPrefix, info.Id, cancellationToken).ConfigureAwait(false);return result.Cast<ChannelInfo>().ToList();}@@ -115,7 +114,7 @@ namespace Emby.Server.Implementations.LiveTv.TunerHostspublic async Task Validate(TunerHostInfo info){- using (var stream = await new M3uParser(Logger, FileSystem, _httpClient, _appHost).GetListingsStream(info.Url, CancellationToken.None).ConfigureAwait(false))+ using (var stream = await new M3uParser(Logger, _httpClient, _appHost).GetListingsStream(info.Url, CancellationToken.None).ConfigureAwait(false)){}diff --git a/Emby.Server.Implementations/LiveTv/TunerHosts/M3uParser.cs b/Emby.Server.Implementations/LiveTv/TunerHosts/M3uParser.csindex 9a01c42d3b..e66f5b42e2 100644--- a/Emby.Server.Implementations/LiveTv/TunerHosts/M3uParser.cs+++ b/Emby.Server.Implementations/LiveTv/TunerHosts/M3uParser.cs@@ -19,14 +19,12 @@ namespace Emby.Server.Implementations.LiveTv.TunerHostspublic class M3uParser{private readonly ILogger _logger;- private readonly IFileSystem _fileSystem;private readonly IHttpClient _httpClient;private readonly IServerApplicationHost _appHost;- public M3uParser(ILogger logger, IFileSystem fileSystem, IHttpClient httpClient, IServerApplicationHost appHost)+ public M3uParser(ILogger logger, IHttpClient httpClient, IServerApplicationHost appHost){_logger = logger;- _fileSystem = fileSystem;_httpClient = httpClient;_appHost = appHost;}