Removed some unused fields
This commit is contained in:
parent
f1ef0b0b4c
commit
a6a4cd5667
|
@ -165,7 +165,7 @@ namespace BDInfo
|
||||||
foreach (var file in files)
|
foreach (var file in files)
|
||||||
{
|
{
|
||||||
PlaylistFiles.Add(
|
PlaylistFiles.Add(
|
||||||
file.Name.ToUpper(), new TSPlaylistFile(this, file, _fileSystem));
|
file.Name.ToUpper(), new TSPlaylistFile(this, file));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -185,7 +185,7 @@ namespace BDInfo
|
||||||
foreach (var file in files)
|
foreach (var file in files)
|
||||||
{
|
{
|
||||||
StreamClipFiles.Add(
|
StreamClipFiles.Add(
|
||||||
file.Name.ToUpper(), new TSStreamClipFile(file, _fileSystem));
|
file.Name.ToUpper(), new TSStreamClipFile(file));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,6 @@ namespace BDInfo
|
||||||
{
|
{
|
||||||
public class TSPlaylistFile
|
public class TSPlaylistFile
|
||||||
{
|
{
|
||||||
private readonly IFileSystem _fileSystem;
|
|
||||||
private FileSystemMetadata FileInfo = null;
|
private FileSystemMetadata FileInfo = null;
|
||||||
public string FileType = null;
|
public string FileType = null;
|
||||||
public bool IsInitialized = false;
|
public bool IsInitialized = false;
|
||||||
|
@ -64,21 +63,19 @@ namespace BDInfo
|
||||||
new List<TSGraphicsStream>();
|
new List<TSGraphicsStream>();
|
||||||
|
|
||||||
public TSPlaylistFile(BDROM bdrom,
|
public TSPlaylistFile(BDROM bdrom,
|
||||||
FileSystemMetadata fileInfo, IFileSystem fileSystem)
|
FileSystemMetadata fileInfo)
|
||||||
{
|
{
|
||||||
BDROM = bdrom;
|
BDROM = bdrom;
|
||||||
FileInfo = fileInfo;
|
FileInfo = fileInfo;
|
||||||
_fileSystem = fileSystem;
|
|
||||||
Name = fileInfo.Name.ToUpper();
|
Name = fileInfo.Name.ToUpper();
|
||||||
}
|
}
|
||||||
|
|
||||||
public TSPlaylistFile(BDROM bdrom,
|
public TSPlaylistFile(BDROM bdrom,
|
||||||
string name,
|
string name,
|
||||||
List<TSStreamClip> clips, IFileSystem fileSystem)
|
List<TSStreamClip> clips)
|
||||||
{
|
{
|
||||||
BDROM = bdrom;
|
BDROM = bdrom;
|
||||||
Name = name;
|
Name = name;
|
||||||
_fileSystem = fileSystem;
|
|
||||||
IsCustom = true;
|
IsCustom = true;
|
||||||
foreach (var clip in clips)
|
foreach (var clip in clips)
|
||||||
{
|
{
|
||||||
|
|
|
@ -28,7 +28,6 @@ namespace BDInfo
|
||||||
{
|
{
|
||||||
public class TSStreamClipFile
|
public class TSStreamClipFile
|
||||||
{
|
{
|
||||||
private readonly IFileSystem _fileSystem;
|
|
||||||
public FileSystemMetadata FileInfo = null;
|
public FileSystemMetadata FileInfo = null;
|
||||||
public string FileType = null;
|
public string FileType = null;
|
||||||
public bool IsValid = false;
|
public bool IsValid = false;
|
||||||
|
@ -37,10 +36,9 @@ namespace BDInfo
|
||||||
public Dictionary<ushort, TSStream> Streams =
|
public Dictionary<ushort, TSStream> Streams =
|
||||||
new Dictionary<ushort, TSStream>();
|
new Dictionary<ushort, TSStream>();
|
||||||
|
|
||||||
public TSStreamClipFile(FileSystemMetadata fileInfo, IFileSystem fileSystem)
|
public TSStreamClipFile(FileSystemMetadata fileInfo)
|
||||||
{
|
{
|
||||||
FileInfo = fileInfo;
|
FileInfo = fileInfo;
|
||||||
_fileSystem = fileSystem;
|
|
||||||
Name = fileInfo.Name.ToUpper();
|
Name = fileInfo.Name.ToUpper();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,6 @@ namespace IsoMounter
|
||||||
|
|
||||||
private readonly IEnvironmentInfo EnvironmentInfo;
|
private readonly IEnvironmentInfo EnvironmentInfo;
|
||||||
private readonly bool ExecutablesAvailable;
|
private readonly bool ExecutablesAvailable;
|
||||||
private readonly IFileSystem FileSystem;
|
|
||||||
private readonly ILogger _logger;
|
private readonly ILogger _logger;
|
||||||
private readonly string MountCommand;
|
private readonly string MountCommand;
|
||||||
private readonly string MountPointRoot;
|
private readonly string MountPointRoot;
|
||||||
|
@ -31,11 +30,10 @@ namespace IsoMounter
|
||||||
|
|
||||||
#region Constructor(s)
|
#region Constructor(s)
|
||||||
|
|
||||||
public LinuxIsoManager(ILogger logger, IFileSystem fileSystem, IEnvironmentInfo environment, IProcessFactory processFactory)
|
public LinuxIsoManager(ILogger logger, IEnvironmentInfo environment, IProcessFactory processFactory)
|
||||||
{
|
{
|
||||||
|
|
||||||
EnvironmentInfo = environment;
|
EnvironmentInfo = environment;
|
||||||
FileSystem = fileSystem;
|
|
||||||
_logger = logger;
|
_logger = logger;
|
||||||
ProcessFactory = processFactory;
|
ProcessFactory = processFactory;
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,6 @@ using MediaBrowser.Controller.Library;
|
||||||
using MediaBrowser.Controller.Providers;
|
using MediaBrowser.Controller.Providers;
|
||||||
using MediaBrowser.Model.Drawing;
|
using MediaBrowser.Model.Drawing;
|
||||||
using MediaBrowser.Model.Entities;
|
using MediaBrowser.Model.Entities;
|
||||||
using MediaBrowser.Model.IO;
|
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using TagLib;
|
using TagLib;
|
||||||
using TagLib.IFD;
|
using TagLib.IFD;
|
||||||
|
@ -21,13 +20,11 @@ namespace Emby.Photos
|
||||||
public class PhotoProvider : ICustomMetadataProvider<Photo>, IForcedProvider, IHasItemChangeMonitor
|
public class PhotoProvider : ICustomMetadataProvider<Photo>, IForcedProvider, IHasItemChangeMonitor
|
||||||
{
|
{
|
||||||
private readonly ILogger _logger;
|
private readonly ILogger _logger;
|
||||||
private readonly IFileSystem _fileSystem;
|
|
||||||
private IImageProcessor _imageProcessor;
|
private IImageProcessor _imageProcessor;
|
||||||
|
|
||||||
public PhotoProvider(ILogger logger, IFileSystem fileSystem, IImageProcessor imageProcessor)
|
public PhotoProvider(ILogger logger, IImageProcessor imageProcessor)
|
||||||
{
|
{
|
||||||
_logger = logger;
|
_logger = logger;
|
||||||
_fileSystem = fileSystem;
|
|
||||||
_imageProcessor = imageProcessor;
|
_imageProcessor = imageProcessor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -79,7 +79,7 @@ namespace Emby.Server.Implementations.AppBase
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
// Lazy load
|
// 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;
|
return _configuration;
|
||||||
}
|
}
|
||||||
protected set
|
protected set
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
using System;
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using MediaBrowser.Model.IO;
|
|
||||||
using MediaBrowser.Model.Serialization;
|
using MediaBrowser.Model.Serialization;
|
||||||
|
|
||||||
namespace Emby.Server.Implementations.AppBase
|
namespace Emby.Server.Implementations.AppBase
|
||||||
|
@ -18,9 +17,8 @@ namespace Emby.Server.Implementations.AppBase
|
||||||
/// <param name="type">The type.</param>
|
/// <param name="type">The type.</param>
|
||||||
/// <param name="path">The path.</param>
|
/// <param name="path">The path.</param>
|
||||||
/// <param name="xmlSerializer">The XML serializer.</param>
|
/// <param name="xmlSerializer">The XML serializer.</param>
|
||||||
/// <param name="fileSystem">The file system</param>
|
|
||||||
/// <returns>System.Object.</returns>
|
/// <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;
|
object configuration;
|
||||||
|
|
||||||
|
|
|
@ -440,7 +440,7 @@ namespace Emby.Server.Implementations
|
||||||
{
|
{
|
||||||
if (_deviceId == null)
|
if (_deviceId == null)
|
||||||
{
|
{
|
||||||
_deviceId = new DeviceId(ApplicationPaths, LoggerFactory, FileSystemManager);
|
_deviceId = new DeviceId(ApplicationPaths, LoggerFactory);
|
||||||
}
|
}
|
||||||
|
|
||||||
return _deviceId.Value;
|
return _deviceId.Value;
|
||||||
|
@ -780,7 +780,7 @@ namespace Emby.Server.Implementations
|
||||||
InstallationManager = new InstallationManager(LoggerFactory, this, ApplicationPaths, HttpClient, JsonSerializer, ServerConfigurationManager, FileSystemManager, CryptographyProvider, PackageRuntime);
|
InstallationManager = new InstallationManager(LoggerFactory, this, ApplicationPaths, HttpClient, JsonSerializer, ServerConfigurationManager, FileSystemManager, CryptographyProvider, PackageRuntime);
|
||||||
RegisterSingleInstance(InstallationManager);
|
RegisterSingleInstance(InstallationManager);
|
||||||
|
|
||||||
ZipClient = new ZipClient(FileSystemManager);
|
ZipClient = new ZipClient();
|
||||||
RegisterSingleInstance(ZipClient);
|
RegisterSingleInstance(ZipClient);
|
||||||
|
|
||||||
HttpResultFactory = new HttpResultFactory(LoggerFactory, FileSystemManager, JsonSerializer, CreateBrotliCompressor());
|
HttpResultFactory = new HttpResultFactory(LoggerFactory, FileSystemManager, JsonSerializer, CreateBrotliCompressor());
|
||||||
|
@ -820,7 +820,7 @@ namespace Emby.Server.Implementations
|
||||||
AuthenticationRepository = GetAuthenticationRepository();
|
AuthenticationRepository = GetAuthenticationRepository();
|
||||||
RegisterSingleInstance(AuthenticationRepository);
|
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);
|
RegisterSingleInstance(UserManager);
|
||||||
|
|
||||||
LibraryManager = new LibraryManager(this, LoggerFactory, TaskManager, UserManager, ServerConfigurationManager, UserDataManager, () => LibraryMonitor, FileSystemManager, () => ProviderManager, () => UserViewManager);
|
LibraryManager = new LibraryManager(this, LoggerFactory, TaskManager, UserManager, ServerConfigurationManager, UserDataManager, () => LibraryMonitor, FileSystemManager, () => ProviderManager, () => UserViewManager);
|
||||||
|
@ -830,7 +830,7 @@ namespace Emby.Server.Implementations
|
||||||
var musicManager = new MusicManager(LibraryManager);
|
var musicManager = new MusicManager(LibraryManager);
|
||||||
RegisterSingleInstance<IMusicManager>(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(LibraryMonitor);
|
||||||
|
|
||||||
RegisterSingleInstance<ISearchEngine>(() => new SearchEngine(LoggerFactory, LibraryManager, UserManager));
|
RegisterSingleInstance<ISearchEngine>(() => new SearchEngine(LoggerFactory, LibraryManager, UserManager));
|
||||||
|
@ -859,7 +859,7 @@ namespace Emby.Server.Implementations
|
||||||
var encryptionManager = new EncryptionManager();
|
var encryptionManager = new EncryptionManager();
|
||||||
RegisterSingleInstance<IEncryptionManager>(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);
|
RegisterSingleInstance(DeviceManager);
|
||||||
|
|
||||||
MediaSourceManager = new MediaSourceManager(ItemRepository, ApplicationPaths, LocalizationManager, UserManager, LibraryManager, LoggerFactory, JsonSerializer, FileSystemManager, UserDataManager, () => MediaEncoder);
|
MediaSourceManager = new MediaSourceManager(ItemRepository, ApplicationPaths, LocalizationManager, UserManager, LibraryManager, LoggerFactory, JsonSerializer, FileSystemManager, UserDataManager, () => MediaEncoder);
|
||||||
|
@ -871,7 +871,7 @@ namespace Emby.Server.Implementations
|
||||||
ProviderManager = new ProviderManager(HttpClient, SubtitleManager, ServerConfigurationManager, LibraryMonitor, LoggerFactory, FileSystemManager, ApplicationPaths, () => LibraryManager, JsonSerializer);
|
ProviderManager = new ProviderManager(HttpClient, SubtitleManager, ServerConfigurationManager, LibraryMonitor, LoggerFactory, FileSystemManager, ApplicationPaths, () => LibraryManager, JsonSerializer);
|
||||||
RegisterSingleInstance(ProviderManager);
|
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);
|
RegisterSingleInstance(DtoService);
|
||||||
|
|
||||||
ChannelManager = new ChannelManager(UserManager, DtoService, LibraryManager, LoggerFactory, ServerConfigurationManager, FileSystemManager, UserDataManager, JsonSerializer, LocalizationManager, HttpClient, ProviderManager);
|
ChannelManager = new ChannelManager(UserManager, DtoService, LibraryManager, LoggerFactory, ServerConfigurationManager, FileSystemManager, UserDataManager, JsonSerializer, LocalizationManager, HttpClient, ProviderManager);
|
||||||
|
@ -1058,7 +1058,7 @@ namespace Emby.Server.Implementations
|
||||||
|
|
||||||
protected virtual FFMpegInfo GetFFMpegInfo()
|
protected virtual FFMpegInfo GetFFMpegInfo()
|
||||||
{
|
{
|
||||||
return new FFMpegLoader(Logger, ApplicationPaths, HttpClient, ZipClient, FileSystemManager, GetFfmpegInstallInfo())
|
return new FFMpegLoader(ApplicationPaths, FileSystemManager, GetFfmpegInstallInfo())
|
||||||
.GetFFMpegInfo(StartupOptions);
|
.GetFFMpegInfo(StartupOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,11 +14,9 @@ namespace Emby.Server.Implementations.Archiving
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class ZipClient : IZipClient
|
public class ZipClient : IZipClient
|
||||||
{
|
{
|
||||||
private readonly IFileSystem _fileSystem;
|
public ZipClient()
|
||||||
|
|
||||||
public ZipClient(IFileSystem fileSystem)
|
|
||||||
{
|
{
|
||||||
_fileSystem = fileSystem;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -10,14 +10,18 @@ using MediaBrowser.Controller.Entities.Movies;
|
||||||
using MediaBrowser.Controller.Entities.TV;
|
using MediaBrowser.Controller.Entities.TV;
|
||||||
using MediaBrowser.Controller.Providers;
|
using MediaBrowser.Controller.Providers;
|
||||||
using MediaBrowser.Model.Entities;
|
using MediaBrowser.Model.Entities;
|
||||||
using MediaBrowser.Model.Extensions;
|
|
||||||
using MediaBrowser.Model.IO;
|
using MediaBrowser.Model.IO;
|
||||||
|
|
||||||
namespace Emby.Server.Implementations.Collections
|
namespace Emby.Server.Implementations.Collections
|
||||||
{
|
{
|
||||||
public class CollectionImageProvider : BaseDynamicImageProvider<BoxSet>
|
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)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -342,14 +342,12 @@ namespace Emby.Server.Implementations.Collections
|
||||||
{
|
{
|
||||||
private readonly CollectionManager _collectionManager;
|
private readonly CollectionManager _collectionManager;
|
||||||
private readonly IServerConfigurationManager _config;
|
private readonly IServerConfigurationManager _config;
|
||||||
private readonly IFileSystem _fileSystem;
|
|
||||||
private ILogger _logger;
|
private ILogger _logger;
|
||||||
|
|
||||||
public CollectionManagerEntryPoint(ICollectionManager collectionManager, IServerConfigurationManager config, IFileSystem fileSystem, ILogger logger)
|
public CollectionManagerEntryPoint(ICollectionManager collectionManager, IServerConfigurationManager config, ILogger logger)
|
||||||
{
|
{
|
||||||
_collectionManager = (CollectionManager)collectionManager;
|
_collectionManager = (CollectionManager)collectionManager;
|
||||||
_config = config;
|
_config = config;
|
||||||
_fileSystem = fileSystem;
|
|
||||||
_logger = logger;
|
_logger = logger;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,8 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using MediaBrowser.Common.Configuration;
|
|
||||||
using MediaBrowser.Controller.Entities;
|
using MediaBrowser.Controller.Entities;
|
||||||
using MediaBrowser.Controller.Library;
|
using MediaBrowser.Controller.Library;
|
||||||
using MediaBrowser.Controller.Persistence;
|
|
||||||
using MediaBrowser.Model.IO;
|
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
|
|
||||||
namespace Emby.Server.Implementations.Data
|
namespace Emby.Server.Implementations.Data
|
||||||
|
@ -13,18 +10,12 @@ namespace Emby.Server.Implementations.Data
|
||||||
public class CleanDatabaseScheduledTask : ILibraryPostScanTask
|
public class CleanDatabaseScheduledTask : ILibraryPostScanTask
|
||||||
{
|
{
|
||||||
private readonly ILibraryManager _libraryManager;
|
private readonly ILibraryManager _libraryManager;
|
||||||
private readonly IItemRepository _itemRepo;
|
|
||||||
private readonly ILogger _logger;
|
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;
|
_libraryManager = libraryManager;
|
||||||
_itemRepo = itemRepo;
|
|
||||||
_logger = logger;
|
_logger = logger;
|
||||||
_fileSystem = fileSystem;
|
|
||||||
_appPaths = appPaths;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Task Run(IProgress<double> progress, CancellationToken cancellationToken)
|
public Task Run(IProgress<double> progress, CancellationToken cancellationToken)
|
||||||
|
|
|
@ -11,7 +11,6 @@ namespace Emby.Server.Implementations.Devices
|
||||||
{
|
{
|
||||||
private readonly IApplicationPaths _appPaths;
|
private readonly IApplicationPaths _appPaths;
|
||||||
private readonly ILogger _logger;
|
private readonly ILogger _logger;
|
||||||
private readonly IFileSystem _fileSystem;
|
|
||||||
|
|
||||||
private readonly object _syncLock = new object();
|
private readonly object _syncLock = new object();
|
||||||
|
|
||||||
|
@ -86,19 +85,10 @@ namespace Emby.Server.Implementations.Devices
|
||||||
|
|
||||||
private string _id;
|
private string _id;
|
||||||
|
|
||||||
public DeviceId(
|
public DeviceId(IApplicationPaths appPaths, ILoggerFactory loggerFactory)
|
||||||
IApplicationPaths appPaths,
|
|
||||||
ILoggerFactory loggerFactory,
|
|
||||||
IFileSystem fileSystem)
|
|
||||||
{
|
{
|
||||||
if (fileSystem == null)
|
|
||||||
{
|
|
||||||
throw new ArgumentNullException(nameof(fileSystem));
|
|
||||||
}
|
|
||||||
|
|
||||||
_appPaths = appPaths;
|
_appPaths = appPaths;
|
||||||
_logger = loggerFactory.CreateLogger("SystemId");
|
_logger = loggerFactory.CreateLogger("SystemId");
|
||||||
_fileSystem = fileSystem;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public string Value => _id ?? (_id = GetDeviceId());
|
public string Value => _id ?? (_id = GetDeviceId());
|
||||||
|
|
|
@ -34,8 +34,6 @@ namespace Emby.Server.Implementations.Devices
|
||||||
private readonly IFileSystem _fileSystem;
|
private readonly IFileSystem _fileSystem;
|
||||||
private readonly ILibraryMonitor _libraryMonitor;
|
private readonly ILibraryMonitor _libraryMonitor;
|
||||||
private readonly IServerConfigurationManager _config;
|
private readonly IServerConfigurationManager _config;
|
||||||
private readonly ILogger _logger;
|
|
||||||
private readonly INetworkManager _network;
|
|
||||||
private readonly ILibraryManager _libraryManager;
|
private readonly ILibraryManager _libraryManager;
|
||||||
private readonly ILocalizationManager _localizationManager;
|
private readonly ILocalizationManager _localizationManager;
|
||||||
|
|
||||||
|
@ -55,17 +53,13 @@ namespace Emby.Server.Implementations.Devices
|
||||||
IUserManager userManager,
|
IUserManager userManager,
|
||||||
IFileSystem fileSystem,
|
IFileSystem fileSystem,
|
||||||
ILibraryMonitor libraryMonitor,
|
ILibraryMonitor libraryMonitor,
|
||||||
IServerConfigurationManager config,
|
IServerConfigurationManager config)
|
||||||
ILoggerFactory loggerFactory,
|
|
||||||
INetworkManager network)
|
|
||||||
{
|
{
|
||||||
_json = json;
|
_json = json;
|
||||||
_userManager = userManager;
|
_userManager = userManager;
|
||||||
_fileSystem = fileSystem;
|
_fileSystem = fileSystem;
|
||||||
_libraryMonitor = libraryMonitor;
|
_libraryMonitor = libraryMonitor;
|
||||||
_config = config;
|
_config = config;
|
||||||
_logger = loggerFactory.CreateLogger(nameof(DeviceManager));
|
|
||||||
_network = network;
|
|
||||||
_libraryManager = libraryManager;
|
_libraryManager = libraryManager;
|
||||||
_localizationManager = localizationManager;
|
_localizationManager = localizationManager;
|
||||||
_authRepo = authRepo;
|
_authRepo = authRepo;
|
||||||
|
@ -414,14 +408,12 @@ namespace Emby.Server.Implementations.Devices
|
||||||
{
|
{
|
||||||
private readonly DeviceManager _deviceManager;
|
private readonly DeviceManager _deviceManager;
|
||||||
private readonly IServerConfigurationManager _config;
|
private readonly IServerConfigurationManager _config;
|
||||||
private readonly IFileSystem _fileSystem;
|
|
||||||
private ILogger _logger;
|
private ILogger _logger;
|
||||||
|
|
||||||
public DeviceManagerEntryPoint(IDeviceManager deviceManager, IServerConfigurationManager config, IFileSystem fileSystem, ILogger logger)
|
public DeviceManagerEntryPoint(IDeviceManager deviceManager, IServerConfigurationManager config, ILogger logger)
|
||||||
{
|
{
|
||||||
_deviceManager = (DeviceManager)deviceManager;
|
_deviceManager = (DeviceManager)deviceManager;
|
||||||
_config = config;
|
_config = config;
|
||||||
_fileSystem = fileSystem;
|
|
||||||
_logger = logger;
|
_logger = logger;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -36,13 +36,9 @@ namespace Emby.Server.Implementations.Dto
|
||||||
private readonly IItemRepository _itemRepo;
|
private readonly IItemRepository _itemRepo;
|
||||||
|
|
||||||
private readonly IImageProcessor _imageProcessor;
|
private readonly IImageProcessor _imageProcessor;
|
||||||
private readonly IServerConfigurationManager _config;
|
|
||||||
private readonly IFileSystem _fileSystem;
|
|
||||||
private readonly IProviderManager _providerManager;
|
private readonly IProviderManager _providerManager;
|
||||||
|
|
||||||
private readonly Func<IChannelManager> _channelManagerFactory;
|
|
||||||
private readonly IApplicationHost _appHost;
|
private readonly IApplicationHost _appHost;
|
||||||
private readonly Func<IDeviceManager> _deviceManager;
|
|
||||||
private readonly Func<IMediaSourceManager> _mediaSourceManager;
|
private readonly Func<IMediaSourceManager> _mediaSourceManager;
|
||||||
private readonly Func<ILiveTvManager> _livetvManager;
|
private readonly Func<ILiveTvManager> _livetvManager;
|
||||||
|
|
||||||
|
@ -52,12 +48,8 @@ namespace Emby.Server.Implementations.Dto
|
||||||
IUserDataManager userDataRepository,
|
IUserDataManager userDataRepository,
|
||||||
IItemRepository itemRepo,
|
IItemRepository itemRepo,
|
||||||
IImageProcessor imageProcessor,
|
IImageProcessor imageProcessor,
|
||||||
IServerConfigurationManager config,
|
|
||||||
IFileSystem fileSystem,
|
|
||||||
IProviderManager providerManager,
|
IProviderManager providerManager,
|
||||||
Func<IChannelManager> channelManagerFactory,
|
|
||||||
IApplicationHost appHost,
|
IApplicationHost appHost,
|
||||||
Func<IDeviceManager> deviceManager,
|
|
||||||
Func<IMediaSourceManager> mediaSourceManager,
|
Func<IMediaSourceManager> mediaSourceManager,
|
||||||
Func<ILiveTvManager> livetvManager)
|
Func<ILiveTvManager> livetvManager)
|
||||||
{
|
{
|
||||||
|
@ -66,12 +58,8 @@ namespace Emby.Server.Implementations.Dto
|
||||||
_userDataRepository = userDataRepository;
|
_userDataRepository = userDataRepository;
|
||||||
_itemRepo = itemRepo;
|
_itemRepo = itemRepo;
|
||||||
_imageProcessor = imageProcessor;
|
_imageProcessor = imageProcessor;
|
||||||
_config = config;
|
|
||||||
_fileSystem = fileSystem;
|
|
||||||
_providerManager = providerManager;
|
_providerManager = providerManager;
|
||||||
_channelManagerFactory = channelManagerFactory;
|
|
||||||
_appHost = appHost;
|
_appHost = appHost;
|
||||||
_deviceManager = deviceManager;
|
|
||||||
_mediaSourceManager = mediaSourceManager;
|
_mediaSourceManager = mediaSourceManager;
|
||||||
_livetvManager = livetvManager;
|
_livetvManager = livetvManager;
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,27 +3,19 @@ using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using MediaBrowser.Common.Configuration;
|
using MediaBrowser.Common.Configuration;
|
||||||
using MediaBrowser.Common.Net;
|
|
||||||
using MediaBrowser.Model.IO;
|
using MediaBrowser.Model.IO;
|
||||||
using Microsoft.Extensions.Logging;
|
|
||||||
|
|
||||||
namespace Emby.Server.Implementations.FFMpeg
|
namespace Emby.Server.Implementations.FFMpeg
|
||||||
{
|
{
|
||||||
public class FFMpegLoader
|
public class FFMpegLoader
|
||||||
{
|
{
|
||||||
private readonly IHttpClient _httpClient;
|
|
||||||
private readonly IApplicationPaths _appPaths;
|
private readonly IApplicationPaths _appPaths;
|
||||||
private readonly ILogger _logger;
|
|
||||||
private readonly IZipClient _zipClient;
|
|
||||||
private readonly IFileSystem _fileSystem;
|
private readonly IFileSystem _fileSystem;
|
||||||
private readonly FFMpegInstallInfo _ffmpegInstallInfo;
|
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;
|
_appPaths = appPaths;
|
||||||
_httpClient = httpClient;
|
|
||||||
_zipClient = zipClient;
|
|
||||||
_fileSystem = fileSystem;
|
_fileSystem = fileSystem;
|
||||||
_ffmpegInstallInfo = ffmpegInstallInfo;
|
_ffmpegInstallInfo = ffmpegInstallInfo;
|
||||||
}
|
}
|
||||||
|
@ -115,8 +107,7 @@ namespace Emby.Server.Implementations.FFMpeg
|
||||||
var encoderFilename = Path.GetFileName(info.EncoderPath);
|
var encoderFilename = Path.GetFileName(info.EncoderPath);
|
||||||
var probeFilename = Path.GetFileName(info.ProbePath);
|
var probeFilename = Path.GetFileName(info.ProbePath);
|
||||||
|
|
||||||
foreach (var directory in _fileSystem.GetDirectoryPaths(rootEncoderPath)
|
foreach (var directory in _fileSystem.GetDirectoryPaths(rootEncoderPath))
|
||||||
.ToList())
|
|
||||||
{
|
{
|
||||||
var allFiles = _fileSystem.GetFilePaths(directory, true).ToList();
|
var allFiles = _fileSystem.GetFilePaths(directory, true).ToList();
|
||||||
|
|
||||||
|
|
|
@ -17,31 +17,23 @@ namespace Emby.Server.Implementations.IO
|
||||||
public class FileRefresher : IDisposable
|
public class FileRefresher : IDisposable
|
||||||
{
|
{
|
||||||
private ILogger Logger { get; set; }
|
private ILogger Logger { get; set; }
|
||||||
private ITaskManager TaskManager { get; set; }
|
|
||||||
private ILibraryManager LibraryManager { get; set; }
|
private ILibraryManager LibraryManager { get; set; }
|
||||||
private IServerConfigurationManager ConfigurationManager { get; set; }
|
private IServerConfigurationManager ConfigurationManager { get; set; }
|
||||||
private readonly IFileSystem _fileSystem;
|
|
||||||
private readonly List<string> _affectedPaths = new List<string>();
|
private readonly List<string> _affectedPaths = new List<string>();
|
||||||
private Timer _timer;
|
private Timer _timer;
|
||||||
private readonly object _timerLock = new object();
|
private readonly object _timerLock = new object();
|
||||||
public string Path { get; private set; }
|
public string Path { get; private set; }
|
||||||
|
|
||||||
public event EventHandler<EventArgs> Completed;
|
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);
|
logger.LogDebug("New file refresher created for {0}", path);
|
||||||
Path = path;
|
Path = path;
|
||||||
|
|
||||||
_fileSystem = fileSystem;
|
|
||||||
ConfigurationManager = configurationManager;
|
ConfigurationManager = configurationManager;
|
||||||
LibraryManager = libraryManager;
|
LibraryManager = libraryManager;
|
||||||
TaskManager = taskManager;
|
|
||||||
Logger = logger;
|
Logger = logger;
|
||||||
_environmentInfo = environmentInfo;
|
|
||||||
_libraryManager = libraryManager1;
|
|
||||||
AddPath(path);
|
AddPath(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@ namespace Emby.Server.Implementations.IO
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Any file name ending in any of these will be ignored by the watchers
|
/// Any file name ending in any of these will be ignored by the watchers
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private readonly HashSet<string> _alwaysIgnoreFiles = new HashSet<string>(StringComparer.OrdinalIgnoreCase)
|
private static readonly HashSet<string> _alwaysIgnoreFiles = new HashSet<string>(StringComparer.OrdinalIgnoreCase)
|
||||||
{
|
{
|
||||||
"small.jpg",
|
"small.jpg",
|
||||||
"albumart.jpg",
|
"albumart.jpg",
|
||||||
|
@ -44,7 +44,7 @@ namespace Emby.Server.Implementations.IO
|
||||||
"TempSBE"
|
"TempSBE"
|
||||||
};
|
};
|
||||||
|
|
||||||
private readonly string[] _alwaysIgnoreSubstrings = new string[]
|
private static readonly string[] _alwaysIgnoreSubstrings = new string[]
|
||||||
{
|
{
|
||||||
// Synology
|
// Synology
|
||||||
"eaDir",
|
"eaDir",
|
||||||
|
@ -53,7 +53,7 @@ namespace Emby.Server.Implementations.IO
|
||||||
".actors"
|
".actors"
|
||||||
};
|
};
|
||||||
|
|
||||||
private readonly HashSet<string> _alwaysIgnoreExtensions = new HashSet<string>(StringComparer.OrdinalIgnoreCase)
|
private static readonly HashSet<string> _alwaysIgnoreExtensions = new HashSet<string>(StringComparer.OrdinalIgnoreCase)
|
||||||
{
|
{
|
||||||
// thumbs.db
|
// thumbs.db
|
||||||
".db",
|
".db",
|
||||||
|
@ -123,12 +123,6 @@ namespace Emby.Server.Implementations.IO
|
||||||
/// <value>The logger.</value>
|
/// <value>The logger.</value>
|
||||||
private ILogger Logger { get; set; }
|
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 ILibraryManager LibraryManager { get; set; }
|
||||||
private IServerConfigurationManager ConfigurationManager { get; set; }
|
private IServerConfigurationManager ConfigurationManager { get; set; }
|
||||||
|
|
||||||
|
@ -140,19 +134,12 @@ namespace Emby.Server.Implementations.IO
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public LibraryMonitor(
|
public LibraryMonitor(
|
||||||
ILoggerFactory loggerFactory,
|
ILoggerFactory loggerFactory,
|
||||||
ITaskManager taskManager,
|
|
||||||
ILibraryManager libraryManager,
|
ILibraryManager libraryManager,
|
||||||
IServerConfigurationManager configurationManager,
|
IServerConfigurationManager configurationManager,
|
||||||
IFileSystem fileSystem,
|
IFileSystem fileSystem,
|
||||||
IEnvironmentInfo environmentInfo)
|
IEnvironmentInfo environmentInfo)
|
||||||
{
|
{
|
||||||
if (taskManager == null)
|
|
||||||
{
|
|
||||||
throw new ArgumentNullException(nameof(taskManager));
|
|
||||||
}
|
|
||||||
|
|
||||||
LibraryManager = libraryManager;
|
LibraryManager = libraryManager;
|
||||||
TaskManager = taskManager;
|
|
||||||
Logger = loggerFactory.CreateLogger(GetType().Name);
|
Logger = loggerFactory.CreateLogger(GetType().Name);
|
||||||
ConfigurationManager = configurationManager;
|
ConfigurationManager = configurationManager;
|
||||||
_fileSystem = fileSystem;
|
_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;
|
newRefresher.Completed += NewRefresher_Completed;
|
||||||
_activeRefreshers.Add(newRefresher);
|
_activeRefreshers.Add(newRefresher);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using MediaBrowser.Controller.Entities;
|
using MediaBrowser.Controller.Entities;
|
||||||
|
@ -7,7 +6,6 @@ using MediaBrowser.Controller.Library;
|
||||||
using MediaBrowser.Controller.Resolvers;
|
using MediaBrowser.Controller.Resolvers;
|
||||||
using MediaBrowser.Model.Extensions;
|
using MediaBrowser.Model.Extensions;
|
||||||
using MediaBrowser.Model.IO;
|
using MediaBrowser.Model.IO;
|
||||||
using Microsoft.Extensions.Logging;
|
|
||||||
|
|
||||||
namespace Emby.Server.Implementations.Library
|
namespace Emby.Server.Implementations.Library
|
||||||
{
|
{
|
||||||
|
@ -16,16 +14,14 @@ namespace Emby.Server.Implementations.Library
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class CoreResolutionIgnoreRule : IResolverIgnoreRule
|
public class CoreResolutionIgnoreRule : IResolverIgnoreRule
|
||||||
{
|
{
|
||||||
private readonly IFileSystem _fileSystem;
|
|
||||||
private readonly ILibraryManager _libraryManager;
|
private readonly ILibraryManager _libraryManager;
|
||||||
private readonly ILogger _logger;
|
|
||||||
|
|
||||||
private bool _ignoreDotPrefix;
|
private bool _ignoreDotPrefix;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Any folder named in this list will be ignored - can be added to at runtime for extensibility
|
/// Any folder named in this list will be ignored - can be added to at runtime for extensibility
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static readonly Dictionary<string, string> IgnoreFolders = new List<string>
|
public static readonly string[] IgnoreFolders =
|
||||||
{
|
{
|
||||||
"metadata",
|
"metadata",
|
||||||
"ps3_update",
|
"ps3_update",
|
||||||
|
@ -50,13 +46,11 @@ namespace Emby.Server.Implementations.Library
|
||||||
// macos
|
// macos
|
||||||
".AppleDouble"
|
".AppleDouble"
|
||||||
|
|
||||||
}.ToDictionary(i => i, StringComparer.OrdinalIgnoreCase);
|
};
|
||||||
|
|
||||||
public CoreResolutionIgnoreRule(IFileSystem fileSystem, ILibraryManager libraryManager, ILogger logger)
|
public CoreResolutionIgnoreRule(ILibraryManager libraryManager)
|
||||||
{
|
{
|
||||||
_fileSystem = fileSystem;
|
|
||||||
_libraryManager = libraryManager;
|
_libraryManager = libraryManager;
|
||||||
_logger = logger;
|
|
||||||
|
|
||||||
_ignoreDotPrefix = Environment.OSVersion.Platform != PlatformID.Win32NT;
|
_ignoreDotPrefix = Environment.OSVersion.Platform != PlatformID.Win32NT;
|
||||||
}
|
}
|
||||||
|
@ -117,7 +111,7 @@ namespace Emby.Server.Implementations.Library
|
||||||
if (fileInfo.IsDirectory)
|
if (fileInfo.IsDirectory)
|
||||||
{
|
{
|
||||||
// Ignore any folders in our list
|
// Ignore any folders in our list
|
||||||
if (IgnoreFolders.ContainsKey(filename))
|
if (IgnoreFolders.Contains(filename, StringComparer.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -986,7 +986,7 @@ namespace Emby.Server.Implementations.Library
|
||||||
// Ensure the location is available.
|
// Ensure the location is available.
|
||||||
Directory.CreateDirectory(ConfigurationManager.ApplicationPaths.PeoplePath);
|
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>
|
/// <summary>
|
||||||
|
@ -2543,7 +2543,7 @@ namespace Emby.Server.Implementations.Library
|
||||||
|
|
||||||
var resolvers = new IItemResolver[]
|
var resolvers = new IItemResolver[]
|
||||||
{
|
{
|
||||||
new GenericVideoResolver<Trailer>(this, _fileSystem)
|
new GenericVideoResolver<Trailer>(this)
|
||||||
};
|
};
|
||||||
|
|
||||||
return ResolvePaths(files, directoryService, null, new LibraryOptions(), null, resolvers)
|
return ResolvePaths(files, directoryService, null, new LibraryOptions(), null, resolvers)
|
||||||
|
|
|
@ -6,7 +6,6 @@ using MediaBrowser.Controller.Entities;
|
||||||
using MediaBrowser.Controller.Library;
|
using MediaBrowser.Controller.Library;
|
||||||
using MediaBrowser.Controller.Providers;
|
using MediaBrowser.Controller.Providers;
|
||||||
using MediaBrowser.Model.Entities;
|
using MediaBrowser.Model.Entities;
|
||||||
using MediaBrowser.Model.IO;
|
|
||||||
|
|
||||||
namespace Emby.Server.Implementations.Library.Resolvers
|
namespace Emby.Server.Implementations.Library.Resolvers
|
||||||
{
|
{
|
||||||
|
@ -18,11 +17,9 @@ namespace Emby.Server.Implementations.Library.Resolvers
|
||||||
where T : Video, new()
|
where T : Video, new()
|
||||||
{
|
{
|
||||||
protected readonly ILibraryManager LibraryManager;
|
protected readonly ILibraryManager LibraryManager;
|
||||||
protected readonly IFileSystem FileSystem;
|
|
||||||
|
|
||||||
protected BaseVideoResolver(ILibraryManager libraryManager, IFileSystem fileSystem)
|
protected BaseVideoResolver(ILibraryManager libraryManager)
|
||||||
{
|
{
|
||||||
FileSystem = fileSystem;
|
|
||||||
LibraryManager = libraryManager;
|
LibraryManager = libraryManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -548,7 +548,8 @@ namespace Emby.Server.Implementations.Library.Resolvers.Movies
|
||||||
|
|
||||||
private IImageProcessor _imageProcessor;
|
private IImageProcessor _imageProcessor;
|
||||||
|
|
||||||
public MovieResolver(ILibraryManager libraryManager, IFileSystem fileSystem, IImageProcessor imageProcessor) : base(libraryManager, fileSystem)
|
public MovieResolver(ILibraryManager libraryManager, IImageProcessor imageProcessor)
|
||||||
|
: base(libraryManager)
|
||||||
{
|
{
|
||||||
_imageProcessor = imageProcessor;
|
_imageProcessor = imageProcessor;
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,6 @@ using MediaBrowser.Controller.Entities;
|
||||||
using MediaBrowser.Controller.Library;
|
using MediaBrowser.Controller.Library;
|
||||||
using MediaBrowser.Model.Configuration;
|
using MediaBrowser.Model.Configuration;
|
||||||
using MediaBrowser.Model.Entities;
|
using MediaBrowser.Model.Entities;
|
||||||
using MediaBrowser.Model.IO;
|
|
||||||
|
|
||||||
namespace Emby.Server.Implementations.Library.Resolvers
|
namespace Emby.Server.Implementations.Library.Resolvers
|
||||||
{
|
{
|
||||||
|
@ -15,13 +14,11 @@ namespace Emby.Server.Implementations.Library.Resolvers
|
||||||
{
|
{
|
||||||
private readonly IImageProcessor _imageProcessor;
|
private readonly IImageProcessor _imageProcessor;
|
||||||
private readonly ILibraryManager _libraryManager;
|
private readonly ILibraryManager _libraryManager;
|
||||||
private readonly IFileSystem _fileSystem;
|
|
||||||
|
|
||||||
public PhotoResolver(IImageProcessor imageProcessor, ILibraryManager libraryManager, IFileSystem fileSystem)
|
public PhotoResolver(IImageProcessor imageProcessor, ILibraryManager libraryManager)
|
||||||
{
|
{
|
||||||
_imageProcessor = imageProcessor;
|
_imageProcessor = imageProcessor;
|
||||||
_libraryManager = libraryManager;
|
_libraryManager = libraryManager;
|
||||||
_fileSystem = fileSystem;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -113,8 +110,7 @@ namespace Emby.Server.Implementations.Library.Resolvers
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return imageProcessor.SupportedInputFormats.Contains((Path.GetExtension(path) ?? string.Empty).TrimStart('.'));
|
return imageProcessor.SupportedInputFormats.Contains(Path.GetExtension(path).TrimStart('.'), StringComparer.Ordinal);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,6 @@ using System.Linq;
|
||||||
using MediaBrowser.Controller.Entities.TV;
|
using MediaBrowser.Controller.Entities.TV;
|
||||||
using MediaBrowser.Controller.Library;
|
using MediaBrowser.Controller.Library;
|
||||||
using MediaBrowser.Model.Entities;
|
using MediaBrowser.Model.Entities;
|
||||||
using MediaBrowser.Model.IO;
|
|
||||||
|
|
||||||
namespace Emby.Server.Implementations.Library.Resolvers.TV
|
namespace Emby.Server.Implementations.Library.Resolvers.TV
|
||||||
{
|
{
|
||||||
|
@ -74,7 +73,8 @@ namespace Emby.Server.Implementations.Library.Resolvers.TV
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public EpisodeResolver(ILibraryManager libraryManager, IFileSystem fileSystem) : base(libraryManager, fileSystem)
|
public EpisodeResolver(ILibraryManager libraryManager)
|
||||||
|
: base(libraryManager)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
using MediaBrowser.Controller.Entities;
|
using MediaBrowser.Controller.Entities;
|
||||||
using MediaBrowser.Controller.Library;
|
using MediaBrowser.Controller.Library;
|
||||||
using MediaBrowser.Model.IO;
|
|
||||||
|
|
||||||
namespace Emby.Server.Implementations.Library.Resolvers
|
namespace Emby.Server.Implementations.Library.Resolvers
|
||||||
{
|
{
|
||||||
public class GenericVideoResolver<T> : BaseVideoResolver<T>
|
public class GenericVideoResolver<T> : BaseVideoResolver<T>
|
||||||
where T : Video, new()
|
where T : Video, new()
|
||||||
{
|
{
|
||||||
public GenericVideoResolver(ILibraryManager libraryManager, IFileSystem fileSystem) : base(libraryManager, fileSystem)
|
public GenericVideoResolver(ILibraryManager libraryManager)
|
||||||
|
: base(libraryManager)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -74,7 +74,6 @@ namespace Emby.Server.Implementations.Library
|
||||||
private readonly Func<IDtoService> _dtoServiceFactory;
|
private readonly Func<IDtoService> _dtoServiceFactory;
|
||||||
private readonly IServerApplicationHost _appHost;
|
private readonly IServerApplicationHost _appHost;
|
||||||
private readonly IFileSystem _fileSystem;
|
private readonly IFileSystem _fileSystem;
|
||||||
private readonly ICryptoProvider _cryptographyProvider;
|
|
||||||
|
|
||||||
private IAuthenticationProvider[] _authenticationProviders;
|
private IAuthenticationProvider[] _authenticationProviders;
|
||||||
private DefaultAuthenticationProvider _defaultAuthenticationProvider;
|
private DefaultAuthenticationProvider _defaultAuthenticationProvider;
|
||||||
|
@ -89,8 +88,7 @@ namespace Emby.Server.Implementations.Library
|
||||||
Func<IDtoService> dtoServiceFactory,
|
Func<IDtoService> dtoServiceFactory,
|
||||||
IServerApplicationHost appHost,
|
IServerApplicationHost appHost,
|
||||||
IJsonSerializer jsonSerializer,
|
IJsonSerializer jsonSerializer,
|
||||||
IFileSystem fileSystem,
|
IFileSystem fileSystem)
|
||||||
ICryptoProvider cryptographyProvider)
|
|
||||||
{
|
{
|
||||||
_logger = loggerFactory.CreateLogger(nameof(UserManager));
|
_logger = loggerFactory.CreateLogger(nameof(UserManager));
|
||||||
UserRepository = userRepository;
|
UserRepository = userRepository;
|
||||||
|
@ -101,7 +99,6 @@ namespace Emby.Server.Implementations.Library
|
||||||
_appHost = appHost;
|
_appHost = appHost;
|
||||||
_jsonSerializer = jsonSerializer;
|
_jsonSerializer = jsonSerializer;
|
||||||
_fileSystem = fileSystem;
|
_fileSystem = fileSystem;
|
||||||
_cryptographyProvider = cryptographyProvider;
|
|
||||||
ConfigurationManager = configurationManager;
|
ConfigurationManager = configurationManager;
|
||||||
_users = Array.Empty<User>();
|
_users = Array.Empty<User>();
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,6 @@ namespace Emby.Server.Implementations.Library.Validators
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private readonly ILogger _logger;
|
private readonly ILogger _logger;
|
||||||
|
|
||||||
private readonly IServerConfigurationManager _config;
|
|
||||||
private readonly IFileSystem _fileSystem;
|
private readonly IFileSystem _fileSystem;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -32,11 +31,10 @@ namespace Emby.Server.Implementations.Library.Validators
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="libraryManager">The library manager.</param>
|
/// <param name="libraryManager">The library manager.</param>
|
||||||
/// <param name="logger">The logger.</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;
|
_libraryManager = libraryManager;
|
||||||
_logger = logger;
|
_logger = logger;
|
||||||
_config = config;
|
|
||||||
_fileSystem = fileSystem;
|
_fileSystem = fileSystem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -105,8 +105,8 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV
|
||||||
_mediaSourceManager = mediaSourceManager;
|
_mediaSourceManager = mediaSourceManager;
|
||||||
_streamHelper = streamHelper;
|
_streamHelper = streamHelper;
|
||||||
|
|
||||||
_seriesTimerProvider = new SeriesTimerManager(fileSystem, jsonSerializer, _logger, Path.Combine(DataPath, "seriestimers"));
|
_seriesTimerProvider = new SeriesTimerManager(jsonSerializer, _logger, Path.Combine(DataPath, "seriestimers"));
|
||||||
_timerProvider = new TimerManager(fileSystem, jsonSerializer, _logger, Path.Combine(DataPath, "timers"), _logger);
|
_timerProvider = new TimerManager(jsonSerializer, _logger, Path.Combine(DataPath, "timers"), _logger);
|
||||||
_timerProvider.TimerFired += _timerProvider_TimerFired;
|
_timerProvider.TimerFired += _timerProvider_TimerFired;
|
||||||
|
|
||||||
_config.NamedConfigurationUpdated += _config_NamedConfigurationUpdated;
|
_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))
|
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);
|
return new DirectRecorder(_logger, _httpClient, _fileSystem, _streamHelper);
|
||||||
|
|
|
@ -7,7 +7,6 @@ using System.Text;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using MediaBrowser.Common.Configuration;
|
using MediaBrowser.Common.Configuration;
|
||||||
using MediaBrowser.Common.Net;
|
|
||||||
using MediaBrowser.Controller;
|
using MediaBrowser.Controller;
|
||||||
using MediaBrowser.Controller.Configuration;
|
using MediaBrowser.Controller.Configuration;
|
||||||
using MediaBrowser.Controller.Library;
|
using MediaBrowser.Controller.Library;
|
||||||
|
@ -17,7 +16,6 @@ using MediaBrowser.Model.Diagnostics;
|
||||||
using MediaBrowser.Model.Dto;
|
using MediaBrowser.Model.Dto;
|
||||||
using MediaBrowser.Model.Entities;
|
using MediaBrowser.Model.Entities;
|
||||||
using MediaBrowser.Model.IO;
|
using MediaBrowser.Model.IO;
|
||||||
using MediaBrowser.Model.Reflection;
|
|
||||||
using MediaBrowser.Model.Serialization;
|
using MediaBrowser.Model.Serialization;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
|
|
||||||
|
@ -27,7 +25,6 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV
|
||||||
{
|
{
|
||||||
private readonly ILogger _logger;
|
private readonly ILogger _logger;
|
||||||
private readonly IFileSystem _fileSystem;
|
private readonly IFileSystem _fileSystem;
|
||||||
private readonly IHttpClient _httpClient;
|
|
||||||
private readonly IMediaEncoder _mediaEncoder;
|
private readonly IMediaEncoder _mediaEncoder;
|
||||||
private readonly IServerApplicationPaths _appPaths;
|
private readonly IServerApplicationPaths _appPaths;
|
||||||
private bool _hasExited;
|
private bool _hasExited;
|
||||||
|
@ -38,19 +35,23 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV
|
||||||
private readonly IJsonSerializer _json;
|
private readonly IJsonSerializer _json;
|
||||||
private readonly TaskCompletionSource<bool> _taskCompletionSource = new TaskCompletionSource<bool>();
|
private readonly TaskCompletionSource<bool> _taskCompletionSource = new TaskCompletionSource<bool>();
|
||||||
private readonly IServerConfigurationManager _config;
|
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;
|
_logger = logger;
|
||||||
_fileSystem = fileSystem;
|
_fileSystem = fileSystem;
|
||||||
_mediaEncoder = mediaEncoder;
|
_mediaEncoder = mediaEncoder;
|
||||||
_appPaths = appPaths;
|
_appPaths = appPaths;
|
||||||
_json = json;
|
_json = json;
|
||||||
_httpClient = httpClient;
|
|
||||||
_processFactory = processFactory;
|
_processFactory = processFactory;
|
||||||
_config = config;
|
_config = config;
|
||||||
_assemblyInfo = assemblyInfo;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static bool CopySubtitles => false;
|
private static bool CopySubtitles => false;
|
||||||
|
|
|
@ -17,15 +17,13 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV
|
||||||
protected readonly ILogger Logger;
|
protected readonly ILogger Logger;
|
||||||
private readonly string _dataPath;
|
private readonly string _dataPath;
|
||||||
protected readonly Func<T, T, bool> EqualityComparer;
|
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;
|
Logger = logger;
|
||||||
_dataPath = dataPath;
|
_dataPath = dataPath;
|
||||||
EqualityComparer = equalityComparer;
|
EqualityComparer = equalityComparer;
|
||||||
_jsonSerializer = jsonSerializer;
|
_jsonSerializer = jsonSerializer;
|
||||||
_fileSystem = fileSystem;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public IReadOnlyList<T> GetAll()
|
public IReadOnlyList<T> GetAll()
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
using System;
|
using System;
|
||||||
using MediaBrowser.Controller.LiveTv;
|
using MediaBrowser.Controller.LiveTv;
|
||||||
using MediaBrowser.Model.IO;
|
|
||||||
using MediaBrowser.Model.Serialization;
|
using MediaBrowser.Model.Serialization;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
|
|
||||||
|
@ -8,8 +7,8 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV
|
||||||
{
|
{
|
||||||
public class SeriesTimerManager : ItemDataProvider<SeriesTimerInfo>
|
public class SeriesTimerManager : ItemDataProvider<SeriesTimerInfo>
|
||||||
{
|
{
|
||||||
public SeriesTimerManager(IFileSystem fileSystem, IJsonSerializer jsonSerializer, ILogger logger, string dataPath)
|
public SeriesTimerManager(IJsonSerializer jsonSerializer, ILogger logger, string dataPath)
|
||||||
: base(fileSystem, jsonSerializer, logger, dataPath, (r1, r2) => string.Equals(r1.Id, r2.Id, StringComparison.OrdinalIgnoreCase))
|
: base(jsonSerializer, logger, dataPath, (r1, r2) => string.Equals(r1.Id, r2.Id, StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,6 @@ using System.Linq;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using MediaBrowser.Controller.LiveTv;
|
using MediaBrowser.Controller.LiveTv;
|
||||||
using MediaBrowser.Model.Events;
|
using MediaBrowser.Model.Events;
|
||||||
using MediaBrowser.Model.IO;
|
|
||||||
using MediaBrowser.Model.LiveTv;
|
using MediaBrowser.Model.LiveTv;
|
||||||
using MediaBrowser.Model.Serialization;
|
using MediaBrowser.Model.Serialization;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
|
@ -19,8 +18,8 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV
|
||||||
|
|
||||||
public event EventHandler<GenericEventArgs<TimerInfo>> TimerFired;
|
public event EventHandler<GenericEventArgs<TimerInfo>> TimerFired;
|
||||||
|
|
||||||
public TimerManager(IFileSystem fileSystem, IJsonSerializer jsonSerializer, ILogger logger, string dataPath, ILogger logger1)
|
public TimerManager(IJsonSerializer jsonSerializer, ILogger logger, string dataPath, ILogger logger1)
|
||||||
: base(fileSystem, jsonSerializer, logger, dataPath, (r1, r2) => string.Equals(r1.Id, r2.Id, StringComparison.OrdinalIgnoreCase))
|
: base(jsonSerializer, logger, dataPath, (r1, r2) => string.Equals(r1.Id, r2.Id, StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
_logger = logger1;
|
_logger = logger1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,6 @@ using MediaBrowser.Common.Configuration;
|
||||||
using MediaBrowser.Controller.Configuration;
|
using MediaBrowser.Controller.Configuration;
|
||||||
using MediaBrowser.Controller.Library;
|
using MediaBrowser.Controller.Library;
|
||||||
using MediaBrowser.Controller.LiveTv;
|
using MediaBrowser.Controller.LiveTv;
|
||||||
using MediaBrowser.Controller.MediaEncoding;
|
|
||||||
using MediaBrowser.Model.Dto;
|
using MediaBrowser.Model.Dto;
|
||||||
using MediaBrowser.Model.IO;
|
using MediaBrowser.Model.IO;
|
||||||
using MediaBrowser.Model.LiveTv;
|
using MediaBrowser.Model.LiveTv;
|
||||||
|
@ -23,18 +22,16 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts
|
||||||
protected readonly IServerConfigurationManager Config;
|
protected readonly IServerConfigurationManager Config;
|
||||||
protected readonly ILogger Logger;
|
protected readonly ILogger Logger;
|
||||||
protected IJsonSerializer JsonSerializer;
|
protected IJsonSerializer JsonSerializer;
|
||||||
protected readonly IMediaEncoder MediaEncoder;
|
|
||||||
protected readonly IFileSystem FileSystem;
|
protected readonly IFileSystem FileSystem;
|
||||||
|
|
||||||
private readonly ConcurrentDictionary<string, ChannelCache> _channelCache =
|
private readonly ConcurrentDictionary<string, ChannelCache> _channelCache =
|
||||||
new ConcurrentDictionary<string, ChannelCache>(StringComparer.OrdinalIgnoreCase);
|
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;
|
Config = config;
|
||||||
Logger = logger;
|
Logger = logger;
|
||||||
JsonSerializer = jsonSerializer;
|
JsonSerializer = jsonSerializer;
|
||||||
MediaEncoder = mediaEncoder;
|
|
||||||
FileSystem = fileSystem;
|
FileSystem = fileSystem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -31,15 +31,22 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts.HdHomerun
|
||||||
private readonly IServerApplicationHost _appHost;
|
private readonly IServerApplicationHost _appHost;
|
||||||
private readonly ISocketFactory _socketFactory;
|
private readonly ISocketFactory _socketFactory;
|
||||||
private readonly INetworkManager _networkManager;
|
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;
|
_httpClient = httpClient;
|
||||||
_appHost = appHost;
|
_appHost = appHost;
|
||||||
_socketFactory = socketFactory;
|
_socketFactory = socketFactory;
|
||||||
_networkManager = networkManager;
|
_networkManager = networkManager;
|
||||||
_environment = environment;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public string Name => "HD Homerun";
|
public string Name => "HD Homerun";
|
||||||
|
|
|
@ -26,15 +26,14 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts
|
||||||
{
|
{
|
||||||
private readonly IHttpClient _httpClient;
|
private readonly IHttpClient _httpClient;
|
||||||
private readonly IServerApplicationHost _appHost;
|
private readonly IServerApplicationHost _appHost;
|
||||||
private readonly IEnvironmentInfo _environment;
|
|
||||||
private readonly INetworkManager _networkManager;
|
private readonly INetworkManager _networkManager;
|
||||||
private readonly IMediaSourceManager _mediaSourceManager;
|
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;
|
_httpClient = httpClient;
|
||||||
_appHost = appHost;
|
_appHost = appHost;
|
||||||
_environment = environment;
|
|
||||||
_networkManager = networkManager;
|
_networkManager = networkManager;
|
||||||
_mediaSourceManager = mediaSourceManager;
|
_mediaSourceManager = mediaSourceManager;
|
||||||
}
|
}
|
||||||
|
@ -52,7 +51,7 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts
|
||||||
{
|
{
|
||||||
var channelIdPrefix = GetFullChannelIdPrefix(info);
|
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();
|
return result.Cast<ChannelInfo>().ToList();
|
||||||
}
|
}
|
||||||
|
@ -115,7 +114,7 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts
|
||||||
|
|
||||||
public async Task Validate(TunerHostInfo info)
|
public 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))
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,14 +19,12 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts
|
||||||
public class M3uParser
|
public class M3uParser
|
||||||
{
|
{
|
||||||
private readonly ILogger _logger;
|
private readonly ILogger _logger;
|
||||||
private readonly IFileSystem _fileSystem;
|
|
||||||
private readonly IHttpClient _httpClient;
|
private readonly IHttpClient _httpClient;
|
||||||
private readonly IServerApplicationHost _appHost;
|
private readonly IServerApplicationHost _appHost;
|
||||||
|
|
||||||
public M3uParser(ILogger logger, IFileSystem fileSystem, IHttpClient httpClient, IServerApplicationHost appHost)
|
public M3uParser(ILogger logger, IHttpClient httpClient, IServerApplicationHost appHost)
|
||||||
{
|
{
|
||||||
_logger = logger;
|
_logger = logger;
|
||||||
_fileSystem = fileSystem;
|
|
||||||
_httpClient = httpClient;
|
_httpClient = httpClient;
|
||||||
_appHost = appHost;
|
_appHost = appHost;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user