mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-11-15 01:48:52 -07:00
Use typed logger where possible
This commit is contained in:
parent
5e056beaae
commit
44957c5a9a
@ -18,7 +18,7 @@ namespace Emby.Dlna.ConnectionManager
|
||||
public ConnectionManager(
|
||||
IDlnaManager dlna,
|
||||
IServerConfigurationManager config,
|
||||
ILogger<ConnectionManager> logger,
|
||||
ILogger logger,
|
||||
IHttpClient httpClient)
|
||||
: base(logger, httpClient)
|
||||
{
|
||||
|
@ -31,7 +31,7 @@ namespace Emby.Dlna
|
||||
private readonly IApplicationPaths _appPaths;
|
||||
private readonly IXmlSerializer _xmlSerializer;
|
||||
private readonly IFileSystem _fileSystem;
|
||||
private readonly ILogger _logger;
|
||||
private readonly ILogger<DlnaManager> _logger;
|
||||
private readonly IJsonSerializer _jsonSerializer;
|
||||
private readonly IServerApplicationHost _appHost;
|
||||
private static readonly Assembly _assembly = typeof(DlnaManager).Assembly;
|
||||
@ -49,7 +49,7 @@ namespace Emby.Dlna
|
||||
_xmlSerializer = xmlSerializer;
|
||||
_fileSystem = fileSystem;
|
||||
_appPaths = appPaths;
|
||||
_logger = loggerFactory.CreateLogger("Dlna");
|
||||
_logger = loggerFactory.CreateLogger<DlnaManager>();
|
||||
_jsonSerializer = jsonSerializer;
|
||||
_appHost = appHost;
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ namespace Emby.Dlna.Main
|
||||
public class DlnaEntryPoint : IServerEntryPoint, IRunBeforeStartup
|
||||
{
|
||||
private readonly IServerConfigurationManager _config;
|
||||
private readonly ILogger _logger;
|
||||
private readonly ILogger<DlnaEntryPoint> _logger;
|
||||
private readonly IServerApplicationHost _appHost;
|
||||
|
||||
private PlayToManager _manager;
|
||||
@ -65,7 +65,8 @@ namespace Emby.Dlna.Main
|
||||
|
||||
public static DlnaEntryPoint Current;
|
||||
|
||||
public DlnaEntryPoint(IServerConfigurationManager config,
|
||||
public DlnaEntryPoint(
|
||||
IServerConfigurationManager config,
|
||||
ILoggerFactory loggerFactory,
|
||||
IServerApplicationHost appHost,
|
||||
ISessionManager sessionManager,
|
||||
@ -99,7 +100,7 @@ namespace Emby.Dlna.Main
|
||||
_mediaEncoder = mediaEncoder;
|
||||
_socketFactory = socketFactory;
|
||||
_networkManager = networkManager;
|
||||
_logger = loggerFactory.CreateLogger("Dlna");
|
||||
_logger = loggerFactory.CreateLogger<DlnaEntryPoint>();
|
||||
|
||||
ContentDirectory = new ContentDirectory.ContentDirectory(
|
||||
dlnaManager,
|
||||
@ -347,7 +348,8 @@ namespace Emby.Dlna.Main
|
||||
|
||||
try
|
||||
{
|
||||
_manager = new PlayToManager(_logger,
|
||||
_manager = new PlayToManager(
|
||||
_logger,
|
||||
_sessionManager,
|
||||
_libraryManager,
|
||||
_userManager,
|
||||
|
@ -184,7 +184,8 @@ namespace Emby.Dlna.PlayTo
|
||||
serverAddress = _appHost.GetLocalApiUrl(info.LocalIpAddress);
|
||||
}
|
||||
|
||||
controller = new PlayToController(sessionInfo,
|
||||
controller = new PlayToController(
|
||||
sessionInfo,
|
||||
_sessionManager,
|
||||
_libraryManager,
|
||||
_logger,
|
||||
|
@ -12,12 +12,12 @@ namespace Emby.Dlna.Service
|
||||
protected IHttpClient HttpClient;
|
||||
protected ILogger Logger;
|
||||
|
||||
protected BaseService(ILogger<BaseService> logger, IHttpClient httpClient)
|
||||
protected BaseService(ILogger logger, IHttpClient httpClient)
|
||||
{
|
||||
Logger = logger;
|
||||
HttpClient = httpClient;
|
||||
|
||||
EventManager = new EventManager(Logger, HttpClient);
|
||||
EventManager = new EventManager(logger, HttpClient);
|
||||
}
|
||||
|
||||
public EventSubscriptionResponse CancelEventSubscription(string subscriptionId)
|
||||
|
@ -28,7 +28,7 @@ namespace Emby.Drawing
|
||||
private static readonly HashSet<string> _transparentImageTypes
|
||||
= new HashSet<string>(StringComparer.OrdinalIgnoreCase) { ".png", ".webp", ".gif" };
|
||||
|
||||
private readonly ILogger _logger;
|
||||
private readonly ILogger<ImageProcessor> _logger;
|
||||
private readonly IFileSystem _fileSystem;
|
||||
private readonly IServerApplicationPaths _appPaths;
|
||||
private readonly IImageEncoder _imageEncoder;
|
||||
|
@ -25,7 +25,7 @@ namespace Emby.Notifications
|
||||
/// </summary>
|
||||
public class NotificationEntryPoint : IServerEntryPoint
|
||||
{
|
||||
private readonly ILogger _logger;
|
||||
private readonly ILogger<NotificationEntryPoint> _logger;
|
||||
private readonly IActivityManager _activityManager;
|
||||
private readonly ILocalizationManager _localization;
|
||||
private readonly INotificationManager _notificationManager;
|
||||
|
@ -21,7 +21,7 @@ namespace Emby.Notifications
|
||||
/// </summary>
|
||||
public class NotificationManager : INotificationManager
|
||||
{
|
||||
private readonly ILogger _logger;
|
||||
private readonly ILogger<NotificationManager> _logger;
|
||||
private readonly IUserManager _userManager;
|
||||
private readonly IServerConfigurationManager _config;
|
||||
|
||||
|
@ -22,7 +22,7 @@ namespace Emby.Photos
|
||||
/// </summary>
|
||||
public class PhotoProvider : ICustomMetadataProvider<Photo>, IForcedProvider, IHasItemChangeMonitor
|
||||
{
|
||||
private readonly ILogger _logger;
|
||||
private readonly ILogger<PhotoProvider> _logger;
|
||||
private readonly IImageProcessor _imageProcessor;
|
||||
|
||||
// These are causing taglib to hang
|
||||
|
@ -53,7 +53,7 @@ namespace Emby.Server.Implementations.AppBase
|
||||
CommonApplicationPaths = applicationPaths;
|
||||
XmlSerializer = xmlSerializer;
|
||||
_fileSystem = fileSystem;
|
||||
Logger = loggerFactory.CreateLogger(GetType().Name);
|
||||
Logger = loggerFactory.CreateLogger<BaseConfigurationManager>();
|
||||
|
||||
UpdateCachePath();
|
||||
}
|
||||
@ -83,7 +83,7 @@ namespace Emby.Server.Implementations.AppBase
|
||||
/// Gets the logger.
|
||||
/// </summary>
|
||||
/// <value>The logger.</value>
|
||||
protected ILogger Logger { get; private set; }
|
||||
protected ILogger<BaseConfigurationManager> Logger { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the XML serializer.
|
||||
|
@ -173,7 +173,7 @@ namespace Emby.Server.Implementations
|
||||
/// <summary>
|
||||
/// Gets the logger.
|
||||
/// </summary>
|
||||
protected ILogger Logger { get; }
|
||||
protected ILogger<ApplicationHost> Logger { get; }
|
||||
|
||||
private IPlugin[] _plugins;
|
||||
|
||||
|
@ -41,7 +41,7 @@ namespace Emby.Server.Implementations.Browser
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
var logger = appHost.Resolve<ILogger>();
|
||||
var logger = appHost.Resolve<ILogger<IServerApplicationHost>>();
|
||||
logger?.LogError(ex, "Failed to open browser window with URL {URL}", relativeUrl);
|
||||
}
|
||||
}
|
||||
|
@ -36,7 +36,7 @@ namespace Emby.Server.Implementations.Channels
|
||||
private readonly IUserDataManager _userDataManager;
|
||||
private readonly IDtoService _dtoService;
|
||||
private readonly ILibraryManager _libraryManager;
|
||||
private readonly ILogger _logger;
|
||||
private readonly ILogger<ChannelManager> _logger;
|
||||
private readonly IServerConfigurationManager _config;
|
||||
private readonly IFileSystem _fileSystem;
|
||||
private readonly IJsonSerializer _jsonSerializer;
|
||||
|
@ -17,7 +17,7 @@ namespace Emby.Server.Implementations.Channels
|
||||
public class RefreshChannelsScheduledTask : IScheduledTask, IConfigurableScheduledTask
|
||||
{
|
||||
private readonly IChannelManager _channelManager;
|
||||
private readonly ILogger _logger;
|
||||
private readonly ILogger<RefreshChannelsScheduledTask> _logger;
|
||||
private readonly ILibraryManager _libraryManager;
|
||||
private readonly ILocalizationManager _localization;
|
||||
|
||||
|
@ -29,7 +29,7 @@ namespace Emby.Server.Implementations.Collections
|
||||
private readonly ILibraryManager _libraryManager;
|
||||
private readonly IFileSystem _fileSystem;
|
||||
private readonly ILibraryMonitor _iLibraryMonitor;
|
||||
private readonly ILogger _logger;
|
||||
private readonly ILogger<CollectionManager> _logger;
|
||||
private readonly IProviderManager _providerManager;
|
||||
private readonly ILocalizationManager _localizationManager;
|
||||
private readonly IApplicationPaths _appPaths;
|
||||
@ -56,7 +56,7 @@ namespace Emby.Server.Implementations.Collections
|
||||
_libraryManager = libraryManager;
|
||||
_fileSystem = fileSystem;
|
||||
_iLibraryMonitor = iLibraryMonitor;
|
||||
_logger = loggerFactory.CreateLogger(nameof(CollectionManager));
|
||||
_logger = loggerFactory.CreateLogger<CollectionManager>();
|
||||
_providerManager = providerManager;
|
||||
_localizationManager = localizationManager;
|
||||
_appPaths = appPaths;
|
||||
@ -370,7 +370,7 @@ namespace Emby.Server.Implementations.Collections
|
||||
{
|
||||
private readonly CollectionManager _collectionManager;
|
||||
private readonly IServerConfigurationManager _config;
|
||||
private readonly ILogger _logger;
|
||||
private readonly ILogger<CollectionManagerEntryPoint> _logger;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="CollectionManagerEntryPoint"/> class.
|
||||
|
@ -17,7 +17,7 @@ namespace Emby.Server.Implementations.Data
|
||||
/// Initializes a new instance of the <see cref="BaseSqliteRepository"/> class.
|
||||
/// </summary>
|
||||
/// <param name="logger">The logger.</param>
|
||||
protected BaseSqliteRepository(ILogger logger)
|
||||
protected BaseSqliteRepository(ILogger<BaseSqliteRepository> logger)
|
||||
{
|
||||
Logger = logger;
|
||||
}
|
||||
@ -32,7 +32,7 @@ namespace Emby.Server.Implementations.Data
|
||||
/// Gets the logger.
|
||||
/// </summary>
|
||||
/// <value>The logger.</value>
|
||||
protected ILogger Logger { get; }
|
||||
protected ILogger<BaseSqliteRepository> Logger { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the default connection flags.
|
||||
|
@ -12,7 +12,7 @@ namespace Emby.Server.Implementations.Data
|
||||
public class CleanDatabaseScheduledTask : ILibraryPostScanTask
|
||||
{
|
||||
private readonly ILibraryManager _libraryManager;
|
||||
private readonly ILogger _logger;
|
||||
private readonly ILogger<CleanDatabaseScheduledTask> _logger;
|
||||
|
||||
public CleanDatabaseScheduledTask(ILibraryManager libraryManager, ILogger<CleanDatabaseScheduledTask> logger)
|
||||
{
|
||||
|
@ -12,7 +12,7 @@ namespace Emby.Server.Implementations.Devices
|
||||
public class DeviceId
|
||||
{
|
||||
private readonly IApplicationPaths _appPaths;
|
||||
private readonly ILogger _logger;
|
||||
private readonly ILogger<DeviceId> _logger;
|
||||
|
||||
private readonly object _syncLock = new object();
|
||||
|
||||
@ -90,7 +90,7 @@ namespace Emby.Server.Implementations.Devices
|
||||
public DeviceId(IApplicationPaths appPaths, ILoggerFactory loggerFactory)
|
||||
{
|
||||
_appPaths = appPaths;
|
||||
_logger = loggerFactory.CreateLogger("SystemId");
|
||||
_logger = loggerFactory.CreateLogger<DeviceId>();
|
||||
}
|
||||
|
||||
public string Value => _id ?? (_id = GetDeviceId());
|
||||
|
@ -29,7 +29,7 @@ namespace Emby.Server.Implementations.Dto
|
||||
{
|
||||
public class DtoService : IDtoService
|
||||
{
|
||||
private readonly ILogger _logger;
|
||||
private readonly ILogger<DtoService> _logger;
|
||||
private readonly ILibraryManager _libraryManager;
|
||||
private readonly IUserDataManager _userDataRepository;
|
||||
private readonly IItemRepository _itemRepo;
|
||||
|
@ -23,7 +23,7 @@ namespace Emby.Server.Implementations.EntryPoints
|
||||
public class ExternalPortForwarding : IServerEntryPoint
|
||||
{
|
||||
private readonly IServerApplicationHost _appHost;
|
||||
private readonly ILogger _logger;
|
||||
private readonly ILogger<ExternalPortForwarding> _logger;
|
||||
private readonly IServerConfigurationManager _config;
|
||||
private readonly IDeviceDiscovery _deviceDiscovery;
|
||||
|
||||
|
@ -28,7 +28,7 @@ namespace Emby.Server.Implementations.EntryPoints
|
||||
|
||||
private readonly ISessionManager _sessionManager;
|
||||
private readonly IUserManager _userManager;
|
||||
private readonly ILogger _logger;
|
||||
private readonly ILogger<LibraryChangedNotifier> _logger;
|
||||
|
||||
/// <summary>
|
||||
/// The library changed sync lock.
|
||||
|
@ -17,7 +17,7 @@ namespace Emby.Server.Implementations.EntryPoints
|
||||
private readonly ILiveTvManager _liveTvManager;
|
||||
private readonly ISessionManager _sessionManager;
|
||||
private readonly IUserManager _userManager;
|
||||
private readonly ILogger _logger;
|
||||
private readonly ILogger<RecordingNotifier> _logger;
|
||||
|
||||
public RecordingNotifier(
|
||||
ISessionManager sessionManager,
|
||||
|
@ -21,7 +21,7 @@ namespace Emby.Server.Implementations.EntryPoints
|
||||
/// <summary>
|
||||
/// The logger.
|
||||
/// </summary>
|
||||
private readonly ILogger _logger;
|
||||
private readonly ILogger<UdpServerEntryPoint> _logger;
|
||||
private readonly IServerApplicationHost _appHost;
|
||||
private readonly IConfiguration _config;
|
||||
|
||||
|
@ -22,7 +22,7 @@ namespace Emby.Server.Implementations.HttpClientManager
|
||||
/// </summary>
|
||||
public class HttpClientManager : IHttpClient
|
||||
{
|
||||
private readonly ILogger _logger;
|
||||
private readonly ILogger<HttpClientManager> _logger;
|
||||
private readonly IApplicationPaths _appPaths;
|
||||
private readonly IFileSystem _fileSystem;
|
||||
private readonly IApplicationHost _appHost;
|
||||
|
@ -41,7 +41,7 @@ namespace Emby.Server.Implementations.HttpServer
|
||||
/// </summary>
|
||||
public const string DefaultRedirectKey = "HttpListenerHost:DefaultRedirectPath";
|
||||
|
||||
private readonly ILogger _logger;
|
||||
private readonly ILogger<HttpListenerHost> _logger;
|
||||
private readonly ILoggerFactory _loggerFactory;
|
||||
private readonly IServerConfigurationManager _config;
|
||||
private readonly INetworkManager _networkManager;
|
||||
@ -397,7 +397,7 @@ namespace Emby.Server.Implementations.HttpServer
|
||||
var response = context.Response;
|
||||
var localPath = context.Request.Path.ToString();
|
||||
|
||||
var req = new WebSocketSharpRequest(request, response, request.Path, _logger);
|
||||
var req = new WebSocketSharpRequest(request, response, request.Path);
|
||||
return RequestHandler(req, request.GetDisplayUrl(), request.Host.ToString(), localPath, context.RequestAborted);
|
||||
}
|
||||
|
||||
|
@ -37,7 +37,7 @@ namespace Emby.Server.Implementations.HttpServer
|
||||
/// <summary>
|
||||
/// The logger.
|
||||
/// </summary>
|
||||
private readonly ILogger _logger;
|
||||
private readonly ILogger<HttpResultFactory> _logger;
|
||||
private readonly IFileSystem _fileSystem;
|
||||
private readonly IJsonSerializer _jsonSerializer;
|
||||
private readonly IStreamHelper _streamHelper;
|
||||
@ -50,7 +50,7 @@ namespace Emby.Server.Implementations.HttpServer
|
||||
_fileSystem = fileSystem;
|
||||
_jsonSerializer = jsonSerializer;
|
||||
_streamHelper = streamHelper;
|
||||
_logger = loggerfactory.CreateLogger("HttpResultFactory");
|
||||
_logger = loggerfactory.CreateLogger<HttpResultFactory>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -45,7 +45,7 @@ namespace Emby.Server.Implementations.HttpServer.Security
|
||||
|
||||
public User Authenticate(HttpRequest request, IAuthenticationAttributes authAttributes)
|
||||
{
|
||||
var req = new WebSocketSharpRequest(request, null, request.Path, _logger);
|
||||
var req = new WebSocketSharpRequest(request, null, request.Path);
|
||||
var user = ValidateUser(req, authAttributes);
|
||||
return user;
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ namespace Emby.Server.Implementations.HttpServer
|
||||
/// <summary>
|
||||
/// The logger.
|
||||
/// </summary>
|
||||
private readonly ILogger _logger;
|
||||
private readonly ILogger<WebSocketConnection> _logger;
|
||||
|
||||
/// <summary>
|
||||
/// The json serializer options.
|
||||
|
@ -18,7 +18,7 @@ namespace Emby.Server.Implementations.IO
|
||||
{
|
||||
public class LibraryMonitor : ILibraryMonitor
|
||||
{
|
||||
private readonly ILogger _logger;
|
||||
private readonly ILogger<LibraryMonitor> _logger;
|
||||
private readonly ILibraryManager _libraryManager;
|
||||
private readonly IServerConfigurationManager _configurationManager;
|
||||
private readonly IFileSystem _fileSystem;
|
||||
|
@ -20,7 +20,7 @@ namespace Emby.Server.Implementations.IO
|
||||
/// </summary>
|
||||
public class ManagedFileSystem : IFileSystem
|
||||
{
|
||||
protected ILogger Logger;
|
||||
protected ILogger<ManagedFileSystem> Logger;
|
||||
|
||||
private readonly List<IShortcutHandler> _shortcutHandlers = new List<IShortcutHandler>();
|
||||
private readonly string _tempPath;
|
||||
|
@ -56,7 +56,7 @@ namespace Emby.Server.Implementations.Library
|
||||
/// </summary>
|
||||
public class LibraryManager : ILibraryManager
|
||||
{
|
||||
private readonly ILogger _logger;
|
||||
private readonly ILogger<LibraryManager> _logger;
|
||||
private readonly ITaskManager _taskManager;
|
||||
private readonly IUserManager _userManager;
|
||||
private readonly IUserDataManager _userDataRepository;
|
||||
|
@ -33,7 +33,7 @@ namespace Emby.Server.Implementations.Library
|
||||
private readonly ILibraryManager _libraryManager;
|
||||
private readonly IJsonSerializer _jsonSerializer;
|
||||
private readonly IFileSystem _fileSystem;
|
||||
private readonly ILogger _logger;
|
||||
private readonly ILogger<MediaSourceManager> _logger;
|
||||
private readonly IUserDataManager _userDataManager;
|
||||
private readonly IMediaEncoder _mediaEncoder;
|
||||
private readonly ILocalizationManager _localizationManager;
|
||||
|
@ -109,7 +109,7 @@ namespace Emby.Server.Implementations.Library.Resolvers.Audio
|
||||
IEnumerable<FileSystemMetadata> list,
|
||||
bool allowSubfolders,
|
||||
IDirectoryService directoryService,
|
||||
ILogger logger,
|
||||
ILogger<MusicAlbumResolver> logger,
|
||||
IFileSystem fileSystem,
|
||||
ILibraryManager libraryManager)
|
||||
{
|
||||
|
@ -16,7 +16,7 @@ namespace Emby.Server.Implementations.Library.Resolvers.TV
|
||||
private readonly IServerConfigurationManager _config;
|
||||
private readonly ILibraryManager _libraryManager;
|
||||
private readonly ILocalizationManager _localization;
|
||||
private readonly ILogger _logger;
|
||||
private readonly ILogger<SeasonResolver> _logger;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="SeasonResolver"/> class.
|
||||
|
@ -20,7 +20,7 @@ namespace Emby.Server.Implementations.Library.Resolvers.TV
|
||||
public class SeriesResolver : FolderResolver<Series>
|
||||
{
|
||||
private readonly IFileSystem _fileSystem;
|
||||
private readonly ILogger _logger;
|
||||
private readonly ILogger<SeriesResolver> _logger;
|
||||
private readonly ILibraryManager _libraryManager;
|
||||
|
||||
/// <summary>
|
||||
@ -119,7 +119,7 @@ namespace Emby.Server.Implementations.Library.Resolvers.TV
|
||||
IEnumerable<FileSystemMetadata> fileSystemChildren,
|
||||
IDirectoryService directoryService,
|
||||
IFileSystem fileSystem,
|
||||
ILogger logger,
|
||||
ILogger<SeriesResolver> logger,
|
||||
ILibraryManager libraryManager,
|
||||
bool isTvContentType)
|
||||
{
|
||||
|
@ -17,7 +17,7 @@ namespace Emby.Server.Implementations.Library
|
||||
{
|
||||
public class SearchEngine : ISearchEngine
|
||||
{
|
||||
private readonly ILogger _logger;
|
||||
private readonly ILogger<SearchEngine> _logger;
|
||||
private readonly ILibraryManager _libraryManager;
|
||||
private readonly IUserManager _userManager;
|
||||
|
||||
|
@ -26,7 +26,7 @@ namespace Emby.Server.Implementations.Library
|
||||
private readonly ConcurrentDictionary<string, UserItemData> _userData =
|
||||
new ConcurrentDictionary<string, UserItemData>(StringComparer.OrdinalIgnoreCase);
|
||||
|
||||
private readonly ILogger _logger;
|
||||
private readonly ILogger<UserDataManager> _logger;
|
||||
private readonly IServerConfigurationManager _config;
|
||||
private readonly IUserManager _userManager;
|
||||
private readonly IUserDataRepository _repository;
|
||||
|
@ -46,7 +46,7 @@ namespace Emby.Server.Implementations.Library
|
||||
private readonly object _policySyncLock = new object();
|
||||
private readonly object _configSyncLock = new object();
|
||||
|
||||
private readonly ILogger _logger;
|
||||
private readonly ILogger<UserManager> _logger;
|
||||
private readonly IUserRepository _userRepository;
|
||||
private readonly IXmlSerializer _xmlSerializer;
|
||||
private readonly IJsonSerializer _jsonSerializer;
|
||||
|
@ -16,7 +16,7 @@ namespace Emby.Server.Implementations.Library.Validators
|
||||
/// The _library manager.
|
||||
/// </summary>
|
||||
private readonly ILibraryManager _libraryManager;
|
||||
private readonly ILogger _logger;
|
||||
private readonly ILogger<ArtistsValidator> _logger;
|
||||
private readonly IItemRepository _itemRepo;
|
||||
|
||||
/// <summary>
|
||||
@ -27,7 +27,7 @@ namespace Emby.Server.Implementations.Library.Validators
|
||||
/// <param name="itemRepo">The item repository.</param>
|
||||
public ArtistsPostScanTask(
|
||||
ILibraryManager libraryManager,
|
||||
ILogger<ArtistsPostScanTask> logger,
|
||||
ILogger<ArtistsValidator> logger,
|
||||
IItemRepository itemRepo)
|
||||
{
|
||||
_libraryManager = libraryManager;
|
||||
|
@ -24,7 +24,7 @@ namespace Emby.Server.Implementations.Library.Validators
|
||||
/// <summary>
|
||||
/// The logger.
|
||||
/// </summary>
|
||||
private readonly ILogger _logger;
|
||||
private readonly ILogger<ArtistsValidator> _logger;
|
||||
private readonly IItemRepository _itemRepo;
|
||||
|
||||
/// <summary>
|
||||
@ -33,7 +33,7 @@ namespace Emby.Server.Implementations.Library.Validators
|
||||
/// <param name="libraryManager">The library manager.</param>
|
||||
/// <param name="logger">The logger.</param>
|
||||
/// <param name="itemRepo">The item repository.</param>
|
||||
public ArtistsValidator(ILibraryManager libraryManager, ILogger logger, IItemRepository itemRepo)
|
||||
public ArtistsValidator(ILibraryManager libraryManager, ILogger<ArtistsValidator> logger, IItemRepository itemRepo)
|
||||
{
|
||||
_libraryManager = libraryManager;
|
||||
_logger = logger;
|
||||
|
@ -16,7 +16,7 @@ namespace Emby.Server.Implementations.Library.Validators
|
||||
/// The _library manager.
|
||||
/// </summary>
|
||||
private readonly ILibraryManager _libraryManager;
|
||||
private readonly ILogger _logger;
|
||||
private readonly ILogger<GenresValidator> _logger;
|
||||
private readonly IItemRepository _itemRepo;
|
||||
|
||||
/// <summary>
|
||||
@ -27,7 +27,7 @@ namespace Emby.Server.Implementations.Library.Validators
|
||||
/// <param name="itemRepo">The item repository.</param>
|
||||
public GenresPostScanTask(
|
||||
ILibraryManager libraryManager,
|
||||
ILogger<GenresPostScanTask> logger,
|
||||
ILogger<GenresValidator> logger,
|
||||
IItemRepository itemRepo)
|
||||
{
|
||||
_libraryManager = libraryManager;
|
||||
|
@ -21,7 +21,7 @@ namespace Emby.Server.Implementations.Library.Validators
|
||||
/// <summary>
|
||||
/// The logger.
|
||||
/// </summary>
|
||||
private readonly ILogger _logger;
|
||||
private readonly ILogger<GenresValidator> _logger;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="GenresValidator"/> class.
|
||||
@ -29,7 +29,7 @@ namespace Emby.Server.Implementations.Library.Validators
|
||||
/// <param name="libraryManager">The library manager.</param>
|
||||
/// <param name="logger">The logger.</param>
|
||||
/// <param name="itemRepo">The item repository.</param>
|
||||
public GenresValidator(ILibraryManager libraryManager, ILogger logger, IItemRepository itemRepo)
|
||||
public GenresValidator(ILibraryManager libraryManager, ILogger<GenresValidator> logger, IItemRepository itemRepo)
|
||||
{
|
||||
_libraryManager = libraryManager;
|
||||
_logger = logger;
|
||||
|
@ -16,7 +16,7 @@ namespace Emby.Server.Implementations.Library.Validators
|
||||
/// The library manager.
|
||||
/// </summary>
|
||||
private readonly ILibraryManager _libraryManager;
|
||||
private readonly ILogger _logger;
|
||||
private readonly ILogger<MusicGenresValidator> _logger;
|
||||
private readonly IItemRepository _itemRepo;
|
||||
|
||||
/// <summary>
|
||||
@ -27,7 +27,7 @@ namespace Emby.Server.Implementations.Library.Validators
|
||||
/// <param name="itemRepo">The item repository.</param>
|
||||
public MusicGenresPostScanTask(
|
||||
ILibraryManager libraryManager,
|
||||
ILogger<MusicGenresPostScanTask> logger,
|
||||
ILogger<MusicGenresValidator> logger,
|
||||
IItemRepository itemRepo)
|
||||
{
|
||||
_libraryManager = libraryManager;
|
||||
|
@ -20,7 +20,7 @@ namespace Emby.Server.Implementations.Library.Validators
|
||||
/// <summary>
|
||||
/// The logger.
|
||||
/// </summary>
|
||||
private readonly ILogger _logger;
|
||||
private readonly ILogger<MusicGenresValidator> _logger;
|
||||
private readonly IItemRepository _itemRepo;
|
||||
|
||||
/// <summary>
|
||||
@ -29,7 +29,7 @@ namespace Emby.Server.Implementations.Library.Validators
|
||||
/// <param name="libraryManager">The library manager.</param>
|
||||
/// <param name="logger">The logger.</param>
|
||||
/// <param name="itemRepo">The item repository.</param>
|
||||
public MusicGenresValidator(ILibraryManager libraryManager, ILogger logger, IItemRepository itemRepo)
|
||||
public MusicGenresValidator(ILibraryManager libraryManager, ILogger<MusicGenresValidator> logger, IItemRepository itemRepo)
|
||||
{
|
||||
_libraryManager = libraryManager;
|
||||
_logger = logger;
|
||||
|
@ -17,7 +17,7 @@ namespace Emby.Server.Implementations.Library.Validators
|
||||
/// </summary>
|
||||
private readonly ILibraryManager _libraryManager;
|
||||
|
||||
private readonly ILogger _logger;
|
||||
private readonly ILogger<StudiosValidator> _logger;
|
||||
private readonly IItemRepository _itemRepo;
|
||||
|
||||
/// <summary>
|
||||
@ -28,7 +28,7 @@ namespace Emby.Server.Implementations.Library.Validators
|
||||
/// <param name="itemRepo">The item repository.</param>
|
||||
public StudiosPostScanTask(
|
||||
ILibraryManager libraryManager,
|
||||
ILogger<StudiosPostScanTask> logger,
|
||||
ILogger<StudiosValidator> logger,
|
||||
IItemRepository itemRepo)
|
||||
{
|
||||
_libraryManager = libraryManager;
|
||||
|
@ -24,7 +24,7 @@ namespace Emby.Server.Implementations.Library.Validators
|
||||
/// <summary>
|
||||
/// The logger.
|
||||
/// </summary>
|
||||
private readonly ILogger _logger;
|
||||
private readonly ILogger<StudiosValidator> _logger;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="StudiosValidator" /> class.
|
||||
@ -32,7 +32,7 @@ namespace Emby.Server.Implementations.Library.Validators
|
||||
/// <param name="libraryManager">The library manager.</param>
|
||||
/// <param name="logger">The logger.</param>
|
||||
/// <param name="itemRepo">The item repository.</param>
|
||||
public StudiosValidator(ILibraryManager libraryManager, ILogger logger, IItemRepository itemRepo)
|
||||
public StudiosValidator(ILibraryManager libraryManager, ILogger<StudiosValidator> logger, IItemRepository itemRepo)
|
||||
{
|
||||
_libraryManager = libraryManager;
|
||||
_logger = logger;
|
||||
|
@ -46,7 +46,7 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV
|
||||
private const int TunerDiscoveryDurationMs = 3000;
|
||||
|
||||
private readonly IServerApplicationHost _appHost;
|
||||
private readonly ILogger _logger;
|
||||
private readonly ILogger<EmbyTV> _logger;
|
||||
private readonly IHttpClient _httpClient;
|
||||
private readonly IServerConfigurationManager _config;
|
||||
private readonly IJsonSerializer _jsonSerializer;
|
||||
|
@ -24,7 +24,7 @@ namespace Emby.Server.Implementations.LiveTv.Listings
|
||||
{
|
||||
public class SchedulesDirect : IListingsProvider
|
||||
{
|
||||
private readonly ILogger _logger;
|
||||
private readonly ILogger<SchedulesDirect> _logger;
|
||||
private readonly IJsonSerializer _jsonSerializer;
|
||||
private readonly IHttpClient _httpClient;
|
||||
private readonly SemaphoreSlim _tokenSemaphore = new SemaphoreSlim(1, 1);
|
||||
|
@ -26,7 +26,7 @@ namespace Emby.Server.Implementations.LiveTv.Listings
|
||||
{
|
||||
private readonly IServerConfigurationManager _config;
|
||||
private readonly IHttpClient _httpClient;
|
||||
private readonly ILogger _logger;
|
||||
private readonly ILogger<XmlTvListingsProvider> _logger;
|
||||
private readonly IFileSystem _fileSystem;
|
||||
private readonly IZipClient _zipClient;
|
||||
|
||||
|
@ -26,7 +26,7 @@ namespace Emby.Server.Implementations.LiveTv
|
||||
|
||||
private const string ServiceName = "Emby";
|
||||
|
||||
private readonly ILogger _logger;
|
||||
private readonly ILogger<LiveTvDtoService> _logger;
|
||||
private readonly IImageProcessor _imageProcessor;
|
||||
private readonly IDtoService _dtoService;
|
||||
private readonly IApplicationHost _appHost;
|
||||
|
@ -44,7 +44,7 @@ namespace Emby.Server.Implementations.LiveTv
|
||||
private const string EtagKey = "ProgramEtag";
|
||||
|
||||
private readonly IServerConfigurationManager _config;
|
||||
private readonly ILogger _logger;
|
||||
private readonly ILogger<LiveTvManager> _logger;
|
||||
private readonly IItemRepository _itemRepo;
|
||||
private readonly IUserManager _userManager;
|
||||
private readonly IDtoService _dtoService;
|
||||
|
@ -23,7 +23,7 @@ namespace Emby.Server.Implementations.LiveTv
|
||||
private const string StreamIdDelimeterString = "_";
|
||||
|
||||
private readonly ILiveTvManager _liveTvManager;
|
||||
private readonly ILogger _logger;
|
||||
private readonly ILogger<LiveTvMediaSourceProvider> _logger;
|
||||
private readonly IMediaSourceManager _mediaSourceManager;
|
||||
private readonly IServerApplicationHost _appHost;
|
||||
|
||||
|
@ -22,14 +22,14 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts
|
||||
public abstract class BaseTunerHost
|
||||
{
|
||||
protected readonly IServerConfigurationManager Config;
|
||||
protected readonly ILogger Logger;
|
||||
protected readonly ILogger<BaseTunerHost> Logger;
|
||||
protected IJsonSerializer JsonSerializer;
|
||||
protected readonly IFileSystem FileSystem;
|
||||
|
||||
private readonly ConcurrentDictionary<string, ChannelCache> _channelCache =
|
||||
new ConcurrentDictionary<string, ChannelCache>(StringComparer.OrdinalIgnoreCase);
|
||||
|
||||
protected BaseTunerHost(IServerConfigurationManager config, ILogger logger, IJsonSerializer jsonSerializer, IFileSystem fileSystem)
|
||||
protected BaseTunerHost(IServerConfigurationManager config, ILogger<BaseTunerHost> logger, IJsonSerializer jsonSerializer, IFileSystem fileSystem)
|
||||
{
|
||||
Config = config;
|
||||
Logger = logger;
|
||||
|
@ -7,6 +7,7 @@ using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Emby.Server.Implementations.Library;
|
||||
using MediaBrowser.Common.Configuration;
|
||||
using MediaBrowser.Controller.Library;
|
||||
using MediaBrowser.Model.Dto;
|
||||
|
@ -25,7 +25,7 @@ namespace Emby.Server.Implementations.Localization
|
||||
|
||||
private readonly IServerConfigurationManager _configurationManager;
|
||||
private readonly IJsonSerializer _jsonSerializer;
|
||||
private readonly ILogger _logger;
|
||||
private readonly ILogger<LocalizationManager> _logger;
|
||||
|
||||
private readonly Dictionary<string, Dictionary<string, ParentalRating>> _allParentalRatings =
|
||||
new Dictionary<string, Dictionary<string, ParentalRating>>(StringComparer.OrdinalIgnoreCase);
|
||||
|
@ -23,7 +23,7 @@ namespace Emby.Server.Implementations.MediaEncoder
|
||||
{
|
||||
private readonly CultureInfo _usCulture = new CultureInfo("en-US");
|
||||
private readonly IFileSystem _fileSystem;
|
||||
private readonly ILogger _logger;
|
||||
private readonly ILogger<EncodingManager> _logger;
|
||||
private readonly IMediaEncoder _encoder;
|
||||
private readonly IChapterManager _chapterManager;
|
||||
private readonly ILibraryManager _libraryManager;
|
||||
|
@ -15,7 +15,7 @@ namespace Emby.Server.Implementations.Networking
|
||||
{
|
||||
public class NetworkManager : INetworkManager
|
||||
{
|
||||
private readonly ILogger _logger;
|
||||
private readonly ILogger<NetworkManager> _logger;
|
||||
|
||||
private IPAddress[] _localIpAddresses;
|
||||
private readonly object _localIpAddressSyncLock = new object();
|
||||
|
@ -29,7 +29,7 @@ namespace Emby.Server.Implementations.Playlists
|
||||
private readonly ILibraryManager _libraryManager;
|
||||
private readonly IFileSystem _fileSystem;
|
||||
private readonly ILibraryMonitor _iLibraryMonitor;
|
||||
private readonly ILogger _logger;
|
||||
private readonly ILogger<PlaylistManager> _logger;
|
||||
private readonly IUserManager _userManager;
|
||||
private readonly IProviderManager _providerManager;
|
||||
private readonly IConfiguration _appConfig;
|
||||
|
@ -12,7 +12,7 @@ namespace Emby.Server.Implementations
|
||||
public class ResourceFileManager : IResourceFileManager
|
||||
{
|
||||
private readonly IFileSystem _fileSystem;
|
||||
private readonly ILogger _logger;
|
||||
private readonly ILogger<ResourceFileManager> _logger;
|
||||
|
||||
public ResourceFileManager(ILogger<ResourceFileManager> logger, IFileSystem fileSystem)
|
||||
{
|
||||
|
@ -36,7 +36,7 @@ namespace Emby.Server.Implementations.ScheduledTasks
|
||||
|
||||
private readonly IJsonSerializer _jsonSerializer;
|
||||
private readonly IApplicationPaths _applicationPaths;
|
||||
private readonly ILogger _logger;
|
||||
private readonly ILogger<TaskManager> _logger;
|
||||
private readonly IFileSystem _fileSystem;
|
||||
|
||||
/// <summary>
|
||||
|
@ -27,7 +27,7 @@ namespace Emby.Server.Implementations.ScheduledTasks
|
||||
/// <summary>
|
||||
/// The _logger.
|
||||
/// </summary>
|
||||
private readonly ILogger _logger;
|
||||
private readonly ILogger<ChapterImagesTask> _logger;
|
||||
|
||||
/// <summary>
|
||||
/// The _library manager.
|
||||
@ -54,7 +54,7 @@ namespace Emby.Server.Implementations.ScheduledTasks
|
||||
IFileSystem fileSystem,
|
||||
ILocalizationManager localization)
|
||||
{
|
||||
_logger = loggerFactory.CreateLogger(GetType().Name);
|
||||
_logger = loggerFactory.CreateLogger<ChapterImagesTask>();
|
||||
_libraryManager = libraryManager;
|
||||
_itemRepo = itemRepo;
|
||||
_appPaths = appPaths;
|
||||
|
@ -23,7 +23,7 @@ namespace Emby.Server.Implementations.ScheduledTasks.Tasks
|
||||
/// <value>The application paths.</value>
|
||||
private IApplicationPaths ApplicationPaths { get; set; }
|
||||
|
||||
private readonly ILogger _logger;
|
||||
private readonly ILogger<DeleteCacheFileTask> _logger;
|
||||
|
||||
private readonly IFileSystem _fileSystem;
|
||||
private readonly ILocalizationManager _localization;
|
||||
|
@ -17,7 +17,7 @@ namespace Emby.Server.Implementations.ScheduledTasks.Tasks
|
||||
/// </summary>
|
||||
public class DeleteTranscodeFileTask : IScheduledTask, IConfigurableScheduledTask
|
||||
{
|
||||
private readonly ILogger _logger;
|
||||
private readonly ILogger<DeleteTranscodeFileTask> _logger;
|
||||
private readonly IConfigurationManager _configurationManager;
|
||||
private readonly IFileSystem _fileSystem;
|
||||
private readonly ILocalizationManager _localization;
|
||||
|
@ -22,7 +22,7 @@ namespace Emby.Server.Implementations.ScheduledTasks
|
||||
/// <summary>
|
||||
/// The _logger.
|
||||
/// </summary>
|
||||
private readonly ILogger _logger;
|
||||
private readonly ILogger<PluginUpdateTask> _logger;
|
||||
|
||||
private readonly IInstallationManager _installationManager;
|
||||
private readonly ILocalizationManager _localization;
|
||||
|
@ -15,7 +15,7 @@ namespace Emby.Server.Implementations.Services
|
||||
|
||||
public class ServiceController
|
||||
{
|
||||
private readonly ILogger _logger;
|
||||
private readonly ILogger<ServiceController> _logger;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ServiceController"/> class.
|
||||
|
@ -45,7 +45,7 @@ namespace Emby.Server.Implementations.Session
|
||||
/// <summary>
|
||||
/// The logger.
|
||||
/// </summary>
|
||||
private readonly ILogger _logger;
|
||||
private readonly ILogger<SessionManager> _logger;
|
||||
|
||||
private readonly ILibraryManager _libraryManager;
|
||||
private readonly IUserManager _userManager;
|
||||
|
@ -41,7 +41,7 @@ namespace Emby.Server.Implementations.Session
|
||||
/// <summary>
|
||||
/// The _logger
|
||||
/// </summary>
|
||||
private readonly ILogger _logger;
|
||||
private readonly ILogger<SessionWebSocketListener> _logger;
|
||||
private readonly ILoggerFactory _loggerFactory;
|
||||
|
||||
private readonly IHttpServer _httpServer;
|
||||
|
@ -17,7 +17,7 @@ namespace Emby.Server.Implementations.Session
|
||||
{
|
||||
public sealed class WebSocketController : ISessionController, IDisposable
|
||||
{
|
||||
private readonly ILogger _logger;
|
||||
private readonly ILogger<WebSocketController> _logger;
|
||||
private readonly ISessionManager _sessionManager;
|
||||
private readonly SessionInfo _session;
|
||||
|
||||
|
@ -26,7 +26,7 @@ namespace Emby.Server.Implementations.SocketSharp
|
||||
private Dictionary<string, object> _items;
|
||||
private string _responseContentType;
|
||||
|
||||
public WebSocketSharpRequest(HttpRequest httpRequest, HttpResponse httpResponse, string operationName, ILogger logger)
|
||||
public WebSocketSharpRequest(HttpRequest httpRequest, HttpResponse httpResponse, string operationName)
|
||||
{
|
||||
this.OperationName = operationName;
|
||||
this.Request = httpRequest;
|
||||
|
@ -21,7 +21,7 @@ namespace Emby.Server.Implementations.SyncPlay
|
||||
/// <summary>
|
||||
/// The logger.
|
||||
/// </summary>
|
||||
private readonly ILogger _logger;
|
||||
private readonly ILogger<SyncPlayManager> _logger;
|
||||
|
||||
/// <summary>
|
||||
/// The user manager.
|
||||
|
@ -39,7 +39,7 @@ namespace Emby.Server.Implementations.Updates
|
||||
/// <summary>
|
||||
/// The logger.
|
||||
/// </summary>
|
||||
private readonly ILogger _logger;
|
||||
private readonly ILogger<InstallationManager> _logger;
|
||||
private readonly IApplicationPaths _appPaths;
|
||||
private readonly IHttpClient _httpClient;
|
||||
private readonly IJsonSerializer _jsonSerializer;
|
||||
|
@ -21,7 +21,7 @@ namespace Jellyfin.Drawing.Skia
|
||||
private static readonly HashSet<string> _transparentImageTypes
|
||||
= new HashSet<string>(StringComparer.OrdinalIgnoreCase) { ".png", ".gif", ".webp" };
|
||||
|
||||
private readonly ILogger _logger;
|
||||
private readonly ILogger<SkiaEncoder> _logger;
|
||||
private readonly IApplicationPaths _appPaths;
|
||||
|
||||
/// <summary>
|
||||
|
@ -10,7 +10,7 @@ namespace Jellyfin.Server.Migrations.Routines
|
||||
/// </summary>
|
||||
internal class DisableTranscodingThrottling : IMigrationRoutine
|
||||
{
|
||||
private readonly ILogger _logger;
|
||||
private readonly ILogger<DisableTranscodingThrottling> _logger;
|
||||
private readonly IConfigurationManager _configManager;
|
||||
|
||||
public DisableTranscodingThrottling(ILogger<DisableTranscodingThrottling> logger, IConfigurationManager configManager)
|
||||
|
@ -14,7 +14,7 @@ namespace Jellyfin.Server.Migrations.Routines
|
||||
internal class RemoveDuplicateExtras : IMigrationRoutine
|
||||
{
|
||||
private const string DbFilename = "library.db";
|
||||
private readonly ILogger _logger;
|
||||
private readonly ILogger<RemoveDuplicateExtras> _logger;
|
||||
private readonly IServerApplicationPaths _paths;
|
||||
|
||||
public RemoveDuplicateExtras(ILogger<RemoveDuplicateExtras> logger, IServerApplicationPaths paths)
|
||||
|
@ -31,7 +31,7 @@ namespace MediaBrowser.Api
|
||||
/// <summary>
|
||||
/// The logger.
|
||||
/// </summary>
|
||||
private ILogger _logger;
|
||||
private ILogger<ApiEntryPoint> _logger;
|
||||
|
||||
/// <summary>
|
||||
/// The configuration manager.
|
||||
|
@ -67,12 +67,13 @@ namespace MediaBrowser.Api.Music
|
||||
{
|
||||
var dtoOptions = GetDtoOptions(_authContext, request);
|
||||
|
||||
var result = SimilarItemsHelper.GetSimilarItemsResult(dtoOptions, _userManager,
|
||||
var result = SimilarItemsHelper.GetSimilarItemsResult(
|
||||
dtoOptions,
|
||||
_userManager,
|
||||
_itemRepo,
|
||||
_libraryManager,
|
||||
_userDataRepository,
|
||||
_dtoService,
|
||||
Logger,
|
||||
request, new[] { typeof(MusicArtist) },
|
||||
SimilarItemsHelper.GetSimiliarityScore);
|
||||
|
||||
@ -88,12 +89,13 @@ namespace MediaBrowser.Api.Music
|
||||
{
|
||||
var dtoOptions = GetDtoOptions(_authContext, request);
|
||||
|
||||
var result = SimilarItemsHelper.GetSimilarItemsResult(dtoOptions, _userManager,
|
||||
var result = SimilarItemsHelper.GetSimilarItemsResult(
|
||||
dtoOptions,
|
||||
_userManager,
|
||||
_itemRepo,
|
||||
_libraryManager,
|
||||
_userDataRepository,
|
||||
_dtoService,
|
||||
Logger,
|
||||
request, new[] { typeof(MusicAlbum) },
|
||||
GetAlbumSimilarityScore);
|
||||
|
||||
|
@ -69,7 +69,7 @@ namespace MediaBrowser.Api
|
||||
/// </summary>
|
||||
public static class SimilarItemsHelper
|
||||
{
|
||||
internal static QueryResult<BaseItemDto> GetSimilarItemsResult(DtoOptions dtoOptions, IUserManager userManager, IItemRepository itemRepository, ILibraryManager libraryManager, IUserDataManager userDataRepository, IDtoService dtoService, ILogger logger, BaseGetSimilarItemsFromItem request, Type[] includeTypes, Func<BaseItem, List<PersonInfo>, List<PersonInfo>, BaseItem, int> getSimilarityScore)
|
||||
internal static QueryResult<BaseItemDto> GetSimilarItemsResult(DtoOptions dtoOptions, IUserManager userManager, IItemRepository itemRepository, ILibraryManager libraryManager, IUserDataManager userDataRepository, IDtoService dtoService, BaseGetSimilarItemsFromItem request, Type[] includeTypes, Func<BaseItem, List<PersonInfo>, List<PersonInfo>, BaseItem, int> getSimilarityScore)
|
||||
{
|
||||
var user = !request.UserId.Equals(Guid.Empty) ? userManager.GetUserById(request.UserId) : null;
|
||||
|
||||
|
@ -557,7 +557,8 @@ namespace MediaBrowser.Controller.Entities
|
||||
/// <summary>
|
||||
/// The logger
|
||||
/// </summary>
|
||||
public static ILogger Logger { get; set; }
|
||||
public static ILoggerFactory LoggerFactory { get; set; }
|
||||
public static ILogger<BaseItem> Logger { get; set; }
|
||||
public static ILibraryManager LibraryManager { get; set; }
|
||||
public static IServerConfigurationManager ConfigurationManager { get; set; }
|
||||
public static IProviderManager ProviderManager { get; set; }
|
||||
|
@ -5,6 +5,7 @@ using System.Text.Json.Serialization;
|
||||
using System.Threading.Tasks;
|
||||
using MediaBrowser.Controller.TV;
|
||||
using MediaBrowser.Model.Querying;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
@ -66,7 +67,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
parent = LibraryManager.GetItemById(ParentId) as Folder ?? parent;
|
||||
}
|
||||
|
||||
return new UserViewBuilder(UserViewManager, LibraryManager, Logger, UserDataManager, TVSeriesManager, ConfigurationManager)
|
||||
return new UserViewBuilder(UserViewManager, LibraryManager, LoggerFactory.CreateLogger<UserViewBuilder>(), UserDataManager, TVSeriesManager, ConfigurationManager)
|
||||
.GetUserItems(parent, this, CollectionType, query);
|
||||
}
|
||||
|
||||
|
@ -17,7 +17,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
private readonly IUserViewManager _userViewManager;
|
||||
private readonly ILibraryManager _libraryManager;
|
||||
private readonly ILogger _logger;
|
||||
private readonly ILogger<UserViewBuilder> _logger;
|
||||
private readonly IUserDataManager _userDataManager;
|
||||
private readonly ITVSeriesManager _tvSeriesManager;
|
||||
private readonly IServerConfigurationManager _config;
|
||||
@ -25,7 +25,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
public UserViewBuilder(
|
||||
IUserViewManager userViewManager,
|
||||
ILibraryManager libraryManager,
|
||||
ILogger logger,
|
||||
ILogger<UserViewBuilder> logger,
|
||||
IUserDataManager userDataManager,
|
||||
ITVSeriesManager tvSeriesManager,
|
||||
IServerConfigurationManager config)
|
||||
|
@ -35,7 +35,8 @@ namespace MediaBrowser.Controller.IO
|
||||
/// <param name="resolveShortcuts">if set to <c>true</c> [resolve shortcuts].</param>
|
||||
/// <returns>Dictionary{System.StringFileSystemInfo}.</returns>
|
||||
/// <exception cref="ArgumentNullException">path</exception>
|
||||
public static FileSystemMetadata[] GetFilteredFileSystemEntries(IDirectoryService directoryService,
|
||||
public static FileSystemMetadata[] GetFilteredFileSystemEntries(
|
||||
IDirectoryService directoryService,
|
||||
string path,
|
||||
IFileSystem fileSystem,
|
||||
IServerApplicationHost appHost,
|
||||
|
@ -21,7 +21,7 @@ namespace MediaBrowser.Controller.Library
|
||||
/// <summary>
|
||||
/// The _logger
|
||||
/// </summary>
|
||||
private readonly ILogger _logger;
|
||||
private readonly ILogger<Profiler> _logger;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Profiler" /> class.
|
||||
|
@ -40,9 +40,9 @@ namespace MediaBrowser.Controller.Net
|
||||
/// <summary>
|
||||
/// The logger
|
||||
/// </summary>
|
||||
protected ILogger Logger;
|
||||
protected ILogger<BasePeriodicWebSocketListener<TReturnDataType, TStateType>> Logger;
|
||||
|
||||
protected BasePeriodicWebSocketListener(ILogger logger)
|
||||
protected BasePeriodicWebSocketListener(ILogger<BasePeriodicWebSocketListener<TReturnDataType, TStateType>> logger)
|
||||
{
|
||||
if (logger == null)
|
||||
{
|
||||
|
@ -3,6 +3,7 @@ using System.Linq;
|
||||
using System.Text.Json.Serialization;
|
||||
using System.Threading;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.Providers;
|
||||
using MediaBrowser.Model.Dto;
|
||||
using MediaBrowser.Model.Session;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
@ -13,7 +13,7 @@ namespace MediaBrowser.LocalMetadata.Images
|
||||
{
|
||||
private readonly IServerConfigurationManager _config;
|
||||
private readonly IFileSystem _fileSystem;
|
||||
private readonly ILogger _logger;
|
||||
private readonly ILogger<InternalMetadataFolderImageProvider> _logger;
|
||||
|
||||
public InternalMetadataFolderImageProvider(
|
||||
IServerConfigurationManager config,
|
||||
|
@ -23,7 +23,7 @@ namespace MediaBrowser.LocalMetadata.Parsers
|
||||
/// <summary>
|
||||
/// The logger
|
||||
/// </summary>
|
||||
protected ILogger Logger { get; private set; }
|
||||
protected ILogger<BaseItemXmlParser<T>> Logger { get; private set; }
|
||||
protected IProviderManager ProviderManager { get; private set; }
|
||||
|
||||
private Dictionary<string, string> _validProviderIds;
|
||||
@ -32,7 +32,7 @@ namespace MediaBrowser.LocalMetadata.Parsers
|
||||
/// Initializes a new instance of the <see cref="BaseItemXmlParser{T}" /> class.
|
||||
/// </summary>
|
||||
/// <param name="logger">The logger.</param>
|
||||
public BaseItemXmlParser(ILogger logger, IProviderManager providerManager)
|
||||
public BaseItemXmlParser(ILogger<BaseItemXmlParser<T>> logger, IProviderManager providerManager)
|
||||
{
|
||||
Logger = logger;
|
||||
ProviderManager = providerManager;
|
||||
|
@ -85,7 +85,7 @@ namespace MediaBrowser.LocalMetadata.Parsers
|
||||
item.Item.LinkedChildren = list.ToArray();
|
||||
}
|
||||
|
||||
public BoxSetXmlParser(ILogger logger, IProviderManager providerManager)
|
||||
public BoxSetXmlParser(ILogger<BoxSetXmlParser> logger, IProviderManager providerManager)
|
||||
: base(logger, providerManager)
|
||||
{
|
||||
}
|
||||
|
@ -93,7 +93,7 @@ namespace MediaBrowser.LocalMetadata.Parsers
|
||||
item.LinkedChildren = list.ToArray();
|
||||
}
|
||||
|
||||
public PlaylistXmlParser(ILogger logger, IProviderManager providerManager)
|
||||
public PlaylistXmlParser(ILogger<PlaylistXmlParser> logger, IProviderManager providerManager)
|
||||
: base(logger, providerManager)
|
||||
{
|
||||
}
|
||||
|
@ -13,10 +13,10 @@ namespace MediaBrowser.LocalMetadata.Providers
|
||||
/// </summary>
|
||||
public class BoxSetXmlProvider : BaseXmlProvider<BoxSet>
|
||||
{
|
||||
private readonly ILogger _logger;
|
||||
private readonly ILogger<BoxSetXmlParser> _logger;
|
||||
private readonly IProviderManager _providerManager;
|
||||
|
||||
public BoxSetXmlProvider(IFileSystem fileSystem, ILogger<BoxSetXmlProvider> logger, IProviderManager providerManager)
|
||||
public BoxSetXmlProvider(IFileSystem fileSystem, ILogger<BoxSetXmlParser> logger, IProviderManager providerManager)
|
||||
: base(fileSystem)
|
||||
{
|
||||
_logger = logger;
|
||||
|
@ -10,12 +10,12 @@ namespace MediaBrowser.LocalMetadata.Providers
|
||||
{
|
||||
public class PlaylistXmlProvider : BaseXmlProvider<Playlist>
|
||||
{
|
||||
private readonly ILogger _logger;
|
||||
private readonly ILogger<PlaylistXmlParser> _logger;
|
||||
private readonly IProviderManager _providerManager;
|
||||
|
||||
public PlaylistXmlProvider(
|
||||
IFileSystem fileSystem,
|
||||
ILogger<PlaylistXmlProvider> logger,
|
||||
ILogger<PlaylistXmlParser> logger,
|
||||
IProviderManager providerManager)
|
||||
: base(fileSystem)
|
||||
{
|
||||
|
@ -21,7 +21,7 @@ namespace MediaBrowser.LocalMetadata.Savers
|
||||
{
|
||||
private static readonly CultureInfo UsCulture = new CultureInfo("en-US");
|
||||
|
||||
public BaseXmlSaver(IFileSystem fileSystem, IServerConfigurationManager configurationManager, ILibraryManager libraryManager, IUserManager userManager, IUserDataManager userDataManager, ILogger logger)
|
||||
public BaseXmlSaver(IFileSystem fileSystem, IServerConfigurationManager configurationManager, ILibraryManager libraryManager, IUserManager userManager, IUserDataManager userDataManager, ILogger<BaseXmlSaver> logger)
|
||||
{
|
||||
FileSystem = fileSystem;
|
||||
ConfigurationManager = configurationManager;
|
||||
@ -36,7 +36,7 @@ namespace MediaBrowser.LocalMetadata.Savers
|
||||
protected ILibraryManager LibraryManager { get; private set; }
|
||||
protected IUserManager UserManager { get; private set; }
|
||||
protected IUserDataManager UserDataManager { get; private set; }
|
||||
protected ILogger Logger { get; private set; }
|
||||
protected ILogger<BaseXmlSaver> Logger { get; private set; }
|
||||
|
||||
public string Name => XmlProviderUtils.Name;
|
||||
|
||||
|
@ -21,7 +21,7 @@ namespace MediaBrowser.MediaEncoding.Attachments
|
||||
{
|
||||
public class AttachmentExtractor : IAttachmentExtractor, IDisposable
|
||||
{
|
||||
private readonly ILogger _logger;
|
||||
private readonly ILogger<AttachmentExtractor> _logger;
|
||||
private readonly IApplicationPaths _appPaths;
|
||||
private readonly IFileSystem _fileSystem;
|
||||
private readonly IMediaEncoder _mediaEncoder;
|
||||
|
@ -34,7 +34,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
||||
/// </summary>
|
||||
internal const int DefaultImageExtractionTimeout = 5000;
|
||||
|
||||
private readonly ILogger _logger;
|
||||
private readonly ILogger<MediaEncoder> _logger;
|
||||
private readonly IServerConfigurationManager _configurationManager;
|
||||
private readonly IFileSystem _fileSystem;
|
||||
private readonly ILocalizationManager _localization;
|
||||
|
@ -25,7 +25,7 @@ namespace MediaBrowser.MediaEncoding.Subtitles
|
||||
public class SubtitleEncoder : ISubtitleEncoder
|
||||
{
|
||||
private readonly ILibraryManager _libraryManager;
|
||||
private readonly ILogger _logger;
|
||||
private readonly ILogger<SubtitleEncoder> _logger;
|
||||
private readonly IApplicationPaths _appPaths;
|
||||
private readonly IFileSystem _fileSystem;
|
||||
private readonly IMediaEncoder _mediaEncoder;
|
||||
|
@ -15,6 +15,7 @@ using MediaBrowser.Model.Configuration;
|
||||
using MediaBrowser.Model.Entities;
|
||||
using MediaBrowser.Model.IO;
|
||||
using MediaBrowser.Model.Net;
|
||||
using MediaBrowser.Providers.Tmdb.Models.General;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace MediaBrowser.Providers.Manager
|
||||
|
@ -20,12 +20,12 @@ namespace MediaBrowser.Providers.Manager
|
||||
where TIdType : ItemLookupInfo, new()
|
||||
{
|
||||
protected readonly IServerConfigurationManager ServerConfigurationManager;
|
||||
protected readonly ILogger Logger;
|
||||
protected readonly ILogger<MetadataService<TItemType, TIdType>> Logger;
|
||||
protected readonly IProviderManager ProviderManager;
|
||||
protected readonly IFileSystem FileSystem;
|
||||
protected readonly ILibraryManager LibraryManager;
|
||||
|
||||
protected MetadataService(IServerConfigurationManager serverConfigurationManager, ILogger logger, IProviderManager providerManager, IFileSystem fileSystem, ILibraryManager libraryManager)
|
||||
protected MetadataService(IServerConfigurationManager serverConfigurationManager, ILogger<MetadataService<TItemType, TIdType>> logger, IProviderManager providerManager, IFileSystem fileSystem, ILibraryManager libraryManager)
|
||||
{
|
||||
ServerConfigurationManager = serverConfigurationManager;
|
||||
Logger = logger;
|
||||
|
@ -36,7 +36,7 @@ namespace MediaBrowser.Providers.Manager
|
||||
/// </summary>
|
||||
public class ProviderManager : IProviderManager, IDisposable
|
||||
{
|
||||
private readonly ILogger _logger;
|
||||
private readonly ILogger<ProviderManager> _logger;
|
||||
private readonly IHttpClient _httpClient;
|
||||
private readonly ILibraryMonitor _libraryMonitor;
|
||||
private readonly IFileSystem _fileSystem;
|
||||
|
@ -37,7 +37,7 @@ namespace MediaBrowser.Providers.MediaInfo
|
||||
IPreRefreshProvider,
|
||||
IHasItemChangeMonitor
|
||||
{
|
||||
private readonly ILogger _logger;
|
||||
private readonly ILogger<FFProbeProvider> _logger;
|
||||
private readonly IIsoManager _isoManager;
|
||||
private readonly IMediaEncoder _mediaEncoder;
|
||||
private readonly IItemRepository _itemRepo;
|
||||
|
@ -25,7 +25,8 @@ namespace MediaBrowser.Providers.MediaInfo
|
||||
_subtitleManager = subtitleManager;
|
||||
}
|
||||
|
||||
public async Task<List<string>> DownloadSubtitles(Video video,
|
||||
public async Task<List<string>> DownloadSubtitles(
|
||||
Video video,
|
||||
List<MediaStream> mediaStreams,
|
||||
bool skipIfEmbeddedSubtitlesPresent,
|
||||
bool skipIfAudioTrackMatches,
|
||||
|
@ -24,7 +24,7 @@ namespace MediaBrowser.Providers.MediaInfo
|
||||
private readonly IServerConfigurationManager _config;
|
||||
private readonly ISubtitleManager _subtitleManager;
|
||||
private readonly IMediaSourceManager _mediaSourceManager;
|
||||
private readonly ILogger _logger;
|
||||
private readonly ILogger<SubtitleScheduledTask> _logger;
|
||||
private readonly IJsonSerializer _json;
|
||||
private readonly ILocalizationManager _localization;
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user