Merge pull request #6856 from cvium/unused_deps
This commit is contained in:
commit
bddded96ff
|
@ -262,7 +262,6 @@ namespace Emby.Dlna.Main
|
||||||
{
|
{
|
||||||
_publisher = new SsdpDevicePublisher(
|
_publisher = new SsdpDevicePublisher(
|
||||||
_communicationsServer,
|
_communicationsServer,
|
||||||
_networkManager,
|
|
||||||
MediaBrowser.Common.System.OperatingSystem.Name,
|
MediaBrowser.Common.System.OperatingSystem.Name,
|
||||||
Environment.OSVersion.VersionString,
|
Environment.OSVersion.VersionString,
|
||||||
_config.GetDlnaConfiguration().SendOnlyMatchedHost)
|
_config.GetDlnaConfiguration().SendOnlyMatchedHost)
|
||||||
|
@ -400,7 +399,6 @@ namespace Emby.Dlna.Main
|
||||||
_imageProcessor,
|
_imageProcessor,
|
||||||
_deviceDiscovery,
|
_deviceDiscovery,
|
||||||
_httpClientFactory,
|
_httpClientFactory,
|
||||||
_config,
|
|
||||||
_userDataManager,
|
_userDataManager,
|
||||||
_localization,
|
_localization,
|
||||||
_mediaSourceManager,
|
_mediaSourceManager,
|
||||||
|
|
|
@ -11,7 +11,6 @@ using System.Threading.Tasks;
|
||||||
using Jellyfin.Data.Events;
|
using Jellyfin.Data.Events;
|
||||||
using MediaBrowser.Common.Extensions;
|
using MediaBrowser.Common.Extensions;
|
||||||
using MediaBrowser.Controller;
|
using MediaBrowser.Controller;
|
||||||
using MediaBrowser.Controller.Configuration;
|
|
||||||
using MediaBrowser.Controller.Dlna;
|
using MediaBrowser.Controller.Dlna;
|
||||||
using MediaBrowser.Controller.Drawing;
|
using MediaBrowser.Controller.Drawing;
|
||||||
using MediaBrowser.Controller.Library;
|
using MediaBrowser.Controller.Library;
|
||||||
|
@ -35,7 +34,6 @@ namespace Emby.Dlna.PlayTo
|
||||||
private readonly IServerApplicationHost _appHost;
|
private readonly IServerApplicationHost _appHost;
|
||||||
private readonly IImageProcessor _imageProcessor;
|
private readonly IImageProcessor _imageProcessor;
|
||||||
private readonly IHttpClientFactory _httpClientFactory;
|
private readonly IHttpClientFactory _httpClientFactory;
|
||||||
private readonly IServerConfigurationManager _config;
|
|
||||||
private readonly IUserDataManager _userDataManager;
|
private readonly IUserDataManager _userDataManager;
|
||||||
private readonly ILocalizationManager _localization;
|
private readonly ILocalizationManager _localization;
|
||||||
|
|
||||||
|
@ -47,7 +45,7 @@ namespace Emby.Dlna.PlayTo
|
||||||
private SemaphoreSlim _sessionLock = new SemaphoreSlim(1, 1);
|
private SemaphoreSlim _sessionLock = new SemaphoreSlim(1, 1);
|
||||||
private CancellationTokenSource _disposeCancellationTokenSource = new CancellationTokenSource();
|
private CancellationTokenSource _disposeCancellationTokenSource = new CancellationTokenSource();
|
||||||
|
|
||||||
public PlayToManager(ILogger logger, ISessionManager sessionManager, ILibraryManager libraryManager, IUserManager userManager, IDlnaManager dlnaManager, IServerApplicationHost appHost, IImageProcessor imageProcessor, IDeviceDiscovery deviceDiscovery, IHttpClientFactory httpClientFactory, IServerConfigurationManager config, IUserDataManager userDataManager, ILocalizationManager localization, IMediaSourceManager mediaSourceManager, IMediaEncoder mediaEncoder)
|
public PlayToManager(ILogger logger, ISessionManager sessionManager, ILibraryManager libraryManager, IUserManager userManager, IDlnaManager dlnaManager, IServerApplicationHost appHost, IImageProcessor imageProcessor, IDeviceDiscovery deviceDiscovery, IHttpClientFactory httpClientFactory, IUserDataManager userDataManager, ILocalizationManager localization, IMediaSourceManager mediaSourceManager, IMediaEncoder mediaEncoder)
|
||||||
{
|
{
|
||||||
_logger = logger;
|
_logger = logger;
|
||||||
_sessionManager = sessionManager;
|
_sessionManager = sessionManager;
|
||||||
|
@ -58,7 +56,6 @@ namespace Emby.Dlna.PlayTo
|
||||||
_imageProcessor = imageProcessor;
|
_imageProcessor = imageProcessor;
|
||||||
_deviceDiscovery = deviceDiscovery;
|
_deviceDiscovery = deviceDiscovery;
|
||||||
_httpClientFactory = httpClientFactory;
|
_httpClientFactory = httpClientFactory;
|
||||||
_config = config;
|
|
||||||
_userDataManager = userDataManager;
|
_userDataManager = userDataManager;
|
||||||
_localization = localization;
|
_localization = localization;
|
||||||
_mediaSourceManager = mediaSourceManager;
|
_mediaSourceManager = mediaSourceManager;
|
||||||
|
|
|
@ -27,7 +27,6 @@ namespace Emby.Server.Implementations.EntryPoints
|
||||||
private readonly IServerApplicationHost _appHost;
|
private readonly IServerApplicationHost _appHost;
|
||||||
private readonly ILogger<ExternalPortForwarding> _logger;
|
private readonly ILogger<ExternalPortForwarding> _logger;
|
||||||
private readonly IServerConfigurationManager _config;
|
private readonly IServerConfigurationManager _config;
|
||||||
private readonly IDeviceDiscovery _deviceDiscovery;
|
|
||||||
|
|
||||||
private readonly ConcurrentDictionary<IPEndPoint, byte> _createdRules = new ConcurrentDictionary<IPEndPoint, byte>();
|
private readonly ConcurrentDictionary<IPEndPoint, byte> _createdRules = new ConcurrentDictionary<IPEndPoint, byte>();
|
||||||
|
|
||||||
|
@ -42,17 +41,14 @@ namespace Emby.Server.Implementations.EntryPoints
|
||||||
/// <param name="logger">The logger.</param>
|
/// <param name="logger">The logger.</param>
|
||||||
/// <param name="appHost">The application host.</param>
|
/// <param name="appHost">The application host.</param>
|
||||||
/// <param name="config">The configuration manager.</param>
|
/// <param name="config">The configuration manager.</param>
|
||||||
/// <param name="deviceDiscovery">The device discovery.</param>
|
|
||||||
public ExternalPortForwarding(
|
public ExternalPortForwarding(
|
||||||
ILogger<ExternalPortForwarding> logger,
|
ILogger<ExternalPortForwarding> logger,
|
||||||
IServerApplicationHost appHost,
|
IServerApplicationHost appHost,
|
||||||
IServerConfigurationManager config,
|
IServerConfigurationManager config)
|
||||||
IDeviceDiscovery deviceDiscovery)
|
|
||||||
{
|
{
|
||||||
_logger = logger;
|
_logger = logger;
|
||||||
_appHost = appHost;
|
_appHost = appHost;
|
||||||
_config = config;
|
_config = config;
|
||||||
_deviceDiscovery = deviceDiscovery;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private string GetConfigIdentifier()
|
private string GetConfigIdentifier()
|
||||||
|
|
|
@ -27,22 +27,16 @@ namespace Emby.Server.Implementations.Library.Resolvers.TV
|
||||||
{
|
{
|
||||||
private readonly ILogger<SeriesResolver> _logger;
|
private readonly ILogger<SeriesResolver> _logger;
|
||||||
private readonly NamingOptions _namingOptions;
|
private readonly NamingOptions _namingOptions;
|
||||||
private readonly IFileSystem _fileSystem;
|
|
||||||
private readonly IServerConfigurationManager _configurationManager;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="SeriesResolver"/> class.
|
/// Initializes a new instance of the <see cref="SeriesResolver"/> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="logger">The logger.</param>
|
/// <param name="logger">The logger.</param>
|
||||||
/// <param name="namingOptions">The naming options.</param>
|
/// <param name="namingOptions">The naming options.</param>
|
||||||
/// <param name="fileSystem">The file system.</param>
|
public SeriesResolver(ILogger<SeriesResolver> logger, NamingOptions namingOptions)
|
||||||
/// <param name="configurationManager">The server configuration manager.</param>
|
|
||||||
public SeriesResolver(ILogger<SeriesResolver> logger, NamingOptions namingOptions, IFileSystem fileSystem, IServerConfigurationManager configurationManager)
|
|
||||||
{
|
{
|
||||||
_logger = logger;
|
_logger = logger;
|
||||||
_namingOptions = namingOptions;
|
_namingOptions = namingOptions;
|
||||||
_fileSystem = fileSystem;
|
|
||||||
_configurationManager = configurationManager;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -21,7 +21,6 @@ using Jellyfin.Extensions;
|
||||||
using Jellyfin.Extensions.Json;
|
using Jellyfin.Extensions.Json;
|
||||||
using MediaBrowser.Common.Net;
|
using MediaBrowser.Common.Net;
|
||||||
using MediaBrowser.Controller.LiveTv;
|
using MediaBrowser.Controller.LiveTv;
|
||||||
using MediaBrowser.Model.Cryptography;
|
|
||||||
using MediaBrowser.Model.Dto;
|
using MediaBrowser.Model.Dto;
|
||||||
using MediaBrowser.Model.Entities;
|
using MediaBrowser.Model.Entities;
|
||||||
using MediaBrowser.Model.LiveTv;
|
using MediaBrowser.Model.LiveTv;
|
||||||
|
@ -36,7 +35,6 @@ namespace Emby.Server.Implementations.LiveTv.Listings
|
||||||
private readonly ILogger<SchedulesDirect> _logger;
|
private readonly ILogger<SchedulesDirect> _logger;
|
||||||
private readonly IHttpClientFactory _httpClientFactory;
|
private readonly IHttpClientFactory _httpClientFactory;
|
||||||
private readonly SemaphoreSlim _tokenSemaphore = new SemaphoreSlim(1, 1);
|
private readonly SemaphoreSlim _tokenSemaphore = new SemaphoreSlim(1, 1);
|
||||||
private readonly ICryptoProvider _cryptoProvider;
|
|
||||||
|
|
||||||
private readonly ConcurrentDictionary<string, NameValuePair> _tokens = new ConcurrentDictionary<string, NameValuePair>();
|
private readonly ConcurrentDictionary<string, NameValuePair> _tokens = new ConcurrentDictionary<string, NameValuePair>();
|
||||||
private readonly JsonSerializerOptions _jsonOptions = JsonDefaults.Options;
|
private readonly JsonSerializerOptions _jsonOptions = JsonDefaults.Options;
|
||||||
|
@ -44,12 +42,10 @@ namespace Emby.Server.Implementations.LiveTv.Listings
|
||||||
|
|
||||||
public SchedulesDirect(
|
public SchedulesDirect(
|
||||||
ILogger<SchedulesDirect> logger,
|
ILogger<SchedulesDirect> logger,
|
||||||
IHttpClientFactory httpClientFactory,
|
IHttpClientFactory httpClientFactory)
|
||||||
ICryptoProvider cryptoProvider)
|
|
||||||
{
|
{
|
||||||
_logger = logger;
|
_logger = logger;
|
||||||
_httpClientFactory = httpClientFactory;
|
_httpClientFactory = httpClientFactory;
|
||||||
_cryptoProvider = cryptoProvider;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
|
@ -170,12 +166,12 @@ namespace Emby.Server.Implementations.LiveTv.Listings
|
||||||
|
|
||||||
const double DesiredAspect = 2.0 / 3;
|
const double DesiredAspect = 2.0 / 3;
|
||||||
|
|
||||||
programEntry.PrimaryImage = GetProgramImage(ApiUrl, imagesWithText, true, DesiredAspect) ??
|
programEntry.PrimaryImage = GetProgramImage(ApiUrl, imagesWithText, DesiredAspect) ??
|
||||||
GetProgramImage(ApiUrl, allImages, true, DesiredAspect);
|
GetProgramImage(ApiUrl, allImages, DesiredAspect);
|
||||||
|
|
||||||
const double WideAspect = 16.0 / 9;
|
const double WideAspect = 16.0 / 9;
|
||||||
|
|
||||||
programEntry.ThumbImage = GetProgramImage(ApiUrl, imagesWithText, true, WideAspect);
|
programEntry.ThumbImage = GetProgramImage(ApiUrl, imagesWithText, WideAspect);
|
||||||
|
|
||||||
// Don't supply the same image twice
|
// Don't supply the same image twice
|
||||||
if (string.Equals(programEntry.PrimaryImage, programEntry.ThumbImage, StringComparison.Ordinal))
|
if (string.Equals(programEntry.PrimaryImage, programEntry.ThumbImage, StringComparison.Ordinal))
|
||||||
|
@ -183,7 +179,7 @@ namespace Emby.Server.Implementations.LiveTv.Listings
|
||||||
programEntry.ThumbImage = null;
|
programEntry.ThumbImage = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
programEntry.BackdropImage = GetProgramImage(ApiUrl, imagesWithoutText, true, WideAspect);
|
programEntry.BackdropImage = GetProgramImage(ApiUrl, imagesWithoutText, WideAspect);
|
||||||
|
|
||||||
// programEntry.bannerImage = GetProgramImage(ApiUrl, data, "Banner", false) ??
|
// programEntry.bannerImage = GetProgramImage(ApiUrl, data, "Banner", false) ??
|
||||||
// GetProgramImage(ApiUrl, data, "Banner-L1", false) ??
|
// GetProgramImage(ApiUrl, data, "Banner-L1", false) ??
|
||||||
|
@ -404,7 +400,7 @@ namespace Emby.Server.Implementations.LiveTv.Listings
|
||||||
return info;
|
return info;
|
||||||
}
|
}
|
||||||
|
|
||||||
private string GetProgramImage(string apiUrl, IEnumerable<ImageDataDto> images, bool returnDefaultImage, double desiredAspect)
|
private static string GetProgramImage(string apiUrl, IEnumerable<ImageDataDto> images, double desiredAspect)
|
||||||
{
|
{
|
||||||
var match = images
|
var match = images
|
||||||
.OrderBy(i => Math.Abs(desiredAspect - GetAspectRatio(i)))
|
.OrderBy(i => Math.Abs(desiredAspect - GetAspectRatio(i)))
|
||||||
|
|
|
@ -58,7 +58,7 @@ namespace Emby.Server.Implementations.Udp
|
||||||
_udpSocket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReuseAddress, true);
|
_udpSocket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReuseAddress, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task RespondToV2Message(string messageText, EndPoint endpoint, CancellationToken cancellationToken)
|
private async Task RespondToV2Message(EndPoint endpoint, CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
string? localUrl = _config[AddressOverrideConfigKey];
|
string? localUrl = _config[AddressOverrideConfigKey];
|
||||||
if (string.IsNullOrEmpty(localUrl))
|
if (string.IsNullOrEmpty(localUrl))
|
||||||
|
@ -76,7 +76,7 @@ namespace Emby.Server.Implementations.Udp
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
await _udpSocket.SendToAsync(JsonSerializer.SerializeToUtf8Bytes(response), SocketFlags.None, endpoint).ConfigureAwait(false);
|
await _udpSocket.SendToAsync(JsonSerializer.SerializeToUtf8Bytes(response), SocketFlags.None, endpoint, cancellationToken).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
catch (SocketException ex)
|
catch (SocketException ex)
|
||||||
{
|
{
|
||||||
|
@ -115,7 +115,7 @@ namespace Emby.Server.Implementations.Udp
|
||||||
var text = Encoding.UTF8.GetString(_receiveBuffer, 0, result.ReceivedBytes);
|
var text = Encoding.UTF8.GetString(_receiveBuffer, 0, result.ReceivedBytes);
|
||||||
if (text.Contains("who is JellyfinServer?", StringComparison.OrdinalIgnoreCase))
|
if (text.Contains("who is JellyfinServer?", StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
await RespondToV2Message(text, result.RemoteEndPoint, cancellationToken).ConfigureAwait(false);
|
await RespondToV2Message(result.RemoteEndPoint, cancellationToken).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (SocketException ex)
|
catch (SocketException ex)
|
||||||
|
|
|
@ -5,8 +5,6 @@ using System.Text.Json;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Jellyfin.Api.Constants;
|
using Jellyfin.Api.Constants;
|
||||||
using MediaBrowser.Controller;
|
|
||||||
using MediaBrowser.Controller.Configuration;
|
|
||||||
using MediaBrowser.Controller.Entities;
|
using MediaBrowser.Controller.Entities;
|
||||||
using MediaBrowser.Controller.Entities.Audio;
|
using MediaBrowser.Controller.Entities.Audio;
|
||||||
using MediaBrowser.Controller.Entities.Movies;
|
using MediaBrowser.Controller.Entities.Movies;
|
||||||
|
@ -30,7 +28,6 @@ namespace Jellyfin.Api.Controllers
|
||||||
public class ItemLookupController : BaseJellyfinApiController
|
public class ItemLookupController : BaseJellyfinApiController
|
||||||
{
|
{
|
||||||
private readonly IProviderManager _providerManager;
|
private readonly IProviderManager _providerManager;
|
||||||
private readonly IServerApplicationPaths _appPaths;
|
|
||||||
private readonly IFileSystem _fileSystem;
|
private readonly IFileSystem _fileSystem;
|
||||||
private readonly ILibraryManager _libraryManager;
|
private readonly ILibraryManager _libraryManager;
|
||||||
private readonly ILogger<ItemLookupController> _logger;
|
private readonly ILogger<ItemLookupController> _logger;
|
||||||
|
@ -39,19 +36,16 @@ namespace Jellyfin.Api.Controllers
|
||||||
/// Initializes a new instance of the <see cref="ItemLookupController"/> class.
|
/// Initializes a new instance of the <see cref="ItemLookupController"/> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="providerManager">Instance of the <see cref="IProviderManager"/> interface.</param>
|
/// <param name="providerManager">Instance of the <see cref="IProviderManager"/> interface.</param>
|
||||||
/// <param name="serverConfigurationManager">Instance of the <see cref="IServerConfigurationManager"/> interface.</param>
|
|
||||||
/// <param name="fileSystem">Instance of the <see cref="IFileSystem"/> interface.</param>
|
/// <param name="fileSystem">Instance of the <see cref="IFileSystem"/> interface.</param>
|
||||||
/// <param name="libraryManager">Instance of the <see cref="ILibraryManager"/> interface.</param>
|
/// <param name="libraryManager">Instance of the <see cref="ILibraryManager"/> interface.</param>
|
||||||
/// <param name="logger">Instance of the <see cref="ILogger{ItemLookupController}"/> interface.</param>
|
/// <param name="logger">Instance of the <see cref="ILogger{ItemLookupController}"/> interface.</param>
|
||||||
public ItemLookupController(
|
public ItemLookupController(
|
||||||
IProviderManager providerManager,
|
IProviderManager providerManager,
|
||||||
IServerConfigurationManager serverConfigurationManager,
|
|
||||||
IFileSystem fileSystem,
|
IFileSystem fileSystem,
|
||||||
ILibraryManager libraryManager,
|
ILibraryManager libraryManager,
|
||||||
ILogger<ItemLookupController> logger)
|
ILogger<ItemLookupController> logger)
|
||||||
{
|
{
|
||||||
_providerManager = providerManager;
|
_providerManager = providerManager;
|
||||||
_appPaths = serverConfigurationManager.ApplicationPaths;
|
|
||||||
_fileSystem = fileSystem;
|
_fileSystem = fileSystem;
|
||||||
_libraryManager = libraryManager;
|
_libraryManager = libraryManager;
|
||||||
_logger = logger;
|
_logger = logger;
|
||||||
|
|
|
@ -26,7 +26,6 @@ namespace Jellyfin.Api.Controllers
|
||||||
private readonly ILibraryManager _libraryManager;
|
private readonly ILibraryManager _libraryManager;
|
||||||
private readonly IDtoService _dtoService;
|
private readonly IDtoService _dtoService;
|
||||||
private readonly IUserManager _userManager;
|
private readonly IUserManager _userManager;
|
||||||
private readonly IUserDataManager _userDataManager;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="PersonsController"/> class.
|
/// Initializes a new instance of the <see cref="PersonsController"/> class.
|
||||||
|
@ -34,17 +33,14 @@ namespace Jellyfin.Api.Controllers
|
||||||
/// <param name="libraryManager">Instance of the <see cref="ILibraryManager"/> interface.</param>
|
/// <param name="libraryManager">Instance of the <see cref="ILibraryManager"/> interface.</param>
|
||||||
/// <param name="dtoService">Instance of the <see cref="IDtoService"/> interface.</param>
|
/// <param name="dtoService">Instance of the <see cref="IDtoService"/> interface.</param>
|
||||||
/// <param name="userManager">Instance of the <see cref="IUserManager"/> interface.</param>
|
/// <param name="userManager">Instance of the <see cref="IUserManager"/> interface.</param>
|
||||||
/// <param name="userDataManager">Instance of the <see cref="IUserDataManager"/> interface.</param>
|
|
||||||
public PersonsController(
|
public PersonsController(
|
||||||
ILibraryManager libraryManager,
|
ILibraryManager libraryManager,
|
||||||
IDtoService dtoService,
|
IDtoService dtoService,
|
||||||
IUserManager userManager,
|
IUserManager userManager)
|
||||||
IUserDataManager userDataManager)
|
|
||||||
{
|
{
|
||||||
_libraryManager = libraryManager;
|
_libraryManager = libraryManager;
|
||||||
_dtoService = dtoService;
|
_dtoService = dtoService;
|
||||||
_userManager = userManager;
|
_userManager = userManager;
|
||||||
_userDataManager = userDataManager;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -28,7 +28,6 @@ namespace Jellyfin.Api.Controllers
|
||||||
{
|
{
|
||||||
private readonly IInstallationManager _installationManager;
|
private readonly IInstallationManager _installationManager;
|
||||||
private readonly IPluginManager _pluginManager;
|
private readonly IPluginManager _pluginManager;
|
||||||
private readonly IConfigurationManager _config;
|
|
||||||
private readonly JsonSerializerOptions _serializerOptions;
|
private readonly JsonSerializerOptions _serializerOptions;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -36,16 +35,13 @@ namespace Jellyfin.Api.Controllers
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="installationManager">Instance of the <see cref="IInstallationManager"/> interface.</param>
|
/// <param name="installationManager">Instance of the <see cref="IInstallationManager"/> interface.</param>
|
||||||
/// <param name="pluginManager">Instance of the <see cref="IPluginManager"/> interface.</param>
|
/// <param name="pluginManager">Instance of the <see cref="IPluginManager"/> interface.</param>
|
||||||
/// <param name="config">Instance of the <see cref="IConfigurationManager"/> interface.</param>
|
|
||||||
public PluginsController(
|
public PluginsController(
|
||||||
IInstallationManager installationManager,
|
IInstallationManager installationManager,
|
||||||
IPluginManager pluginManager,
|
IPluginManager pluginManager)
|
||||||
IConfigurationManager config)
|
|
||||||
{
|
{
|
||||||
_installationManager = installationManager;
|
_installationManager = installationManager;
|
||||||
_pluginManager = pluginManager;
|
_pluginManager = pluginManager;
|
||||||
_serializerOptions = JsonDefaults.Options;
|
_serializerOptions = JsonDefaults.Options;
|
||||||
_config = config;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -30,7 +30,6 @@ namespace Jellyfin.Api.Controllers
|
||||||
{
|
{
|
||||||
private readonly IProviderManager _providerManager;
|
private readonly IProviderManager _providerManager;
|
||||||
private readonly IServerApplicationPaths _applicationPaths;
|
private readonly IServerApplicationPaths _applicationPaths;
|
||||||
private readonly IHttpClientFactory _httpClientFactory;
|
|
||||||
private readonly ILibraryManager _libraryManager;
|
private readonly ILibraryManager _libraryManager;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -38,17 +37,14 @@ namespace Jellyfin.Api.Controllers
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="providerManager">Instance of the <see cref="IProviderManager"/> interface.</param>
|
/// <param name="providerManager">Instance of the <see cref="IProviderManager"/> interface.</param>
|
||||||
/// <param name="applicationPaths">Instance of the <see cref="IServerApplicationPaths"/> interface.</param>
|
/// <param name="applicationPaths">Instance of the <see cref="IServerApplicationPaths"/> interface.</param>
|
||||||
/// <param name="httpClientFactory">Instance of the <see cref="IHttpClientFactory"/> interface.</param>
|
|
||||||
/// <param name="libraryManager">Instance of the <see cref="ILibraryManager"/> interface.</param>
|
/// <param name="libraryManager">Instance of the <see cref="ILibraryManager"/> interface.</param>
|
||||||
public RemoteImageController(
|
public RemoteImageController(
|
||||||
IProviderManager providerManager,
|
IProviderManager providerManager,
|
||||||
IServerApplicationPaths applicationPaths,
|
IServerApplicationPaths applicationPaths,
|
||||||
IHttpClientFactory httpClientFactory,
|
|
||||||
ILibraryManager libraryManager)
|
ILibraryManager libraryManager)
|
||||||
{
|
{
|
||||||
_providerManager = providerManager;
|
_providerManager = providerManager;
|
||||||
_applicationPaths = applicationPaths;
|
_applicationPaths = applicationPaths;
|
||||||
_httpClientFactory = httpClientFactory;
|
|
||||||
_libraryManager = libraryManager;
|
_libraryManager = libraryManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -102,7 +102,7 @@ namespace MediaBrowser.Controller.Entities
|
||||||
parent = LibraryManager.GetItemById(ParentId) as Folder ?? parent;
|
parent = LibraryManager.GetItemById(ParentId) as Folder ?? parent;
|
||||||
}
|
}
|
||||||
|
|
||||||
return new UserViewBuilder(UserViewManager, LibraryManager, Logger, UserDataManager, TVSeriesManager, ConfigurationManager)
|
return new UserViewBuilder(UserViewManager, LibraryManager, Logger, UserDataManager, TVSeriesManager)
|
||||||
.GetUserItems(parent, this, CollectionType, query);
|
.GetUserItems(parent, this, CollectionType, query);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,6 @@ using System.Globalization;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Jellyfin.Data.Entities;
|
using Jellyfin.Data.Entities;
|
||||||
using Jellyfin.Data.Enums;
|
using Jellyfin.Data.Enums;
|
||||||
using MediaBrowser.Controller.Configuration;
|
|
||||||
using MediaBrowser.Controller.Entities.Movies;
|
using MediaBrowser.Controller.Entities.Movies;
|
||||||
using MediaBrowser.Controller.Library;
|
using MediaBrowser.Controller.Library;
|
||||||
using MediaBrowser.Controller.TV;
|
using MediaBrowser.Controller.TV;
|
||||||
|
@ -30,22 +29,19 @@ namespace MediaBrowser.Controller.Entities
|
||||||
private readonly ILogger<BaseItem> _logger;
|
private readonly ILogger<BaseItem> _logger;
|
||||||
private readonly IUserDataManager _userDataManager;
|
private readonly IUserDataManager _userDataManager;
|
||||||
private readonly ITVSeriesManager _tvSeriesManager;
|
private readonly ITVSeriesManager _tvSeriesManager;
|
||||||
private readonly IServerConfigurationManager _config;
|
|
||||||
|
|
||||||
public UserViewBuilder(
|
public UserViewBuilder(
|
||||||
IUserViewManager userViewManager,
|
IUserViewManager userViewManager,
|
||||||
ILibraryManager libraryManager,
|
ILibraryManager libraryManager,
|
||||||
ILogger<BaseItem> logger,
|
ILogger<BaseItem> logger,
|
||||||
IUserDataManager userDataManager,
|
IUserDataManager userDataManager,
|
||||||
ITVSeriesManager tvSeriesManager,
|
ITVSeriesManager tvSeriesManager)
|
||||||
IServerConfigurationManager config)
|
|
||||||
{
|
{
|
||||||
_userViewManager = userViewManager;
|
_userViewManager = userViewManager;
|
||||||
_libraryManager = libraryManager;
|
_libraryManager = libraryManager;
|
||||||
_logger = logger;
|
_logger = logger;
|
||||||
_userDataManager = userDataManager;
|
_userDataManager = userDataManager;
|
||||||
_tvSeriesManager = tvSeriesManager;
|
_tvSeriesManager = tvSeriesManager;
|
||||||
_config = config;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public QueryResult<BaseItem> GetUserItems(Folder queryParent, Folder displayParent, string viewType, InternalItemsQuery query)
|
public QueryResult<BaseItem> GetUserItems(Folder queryParent, Folder displayParent, string viewType, InternalItemsQuery query)
|
||||||
|
|
|
@ -17,11 +17,6 @@ namespace MediaBrowser.Controller.SyncPlay.GroupStates
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
public class PausedGroupState : AbstractGroupState
|
public class PausedGroupState : AbstractGroupState
|
||||||
{
|
{
|
||||||
/// <summary>
|
|
||||||
/// The logger.
|
|
||||||
/// </summary>
|
|
||||||
private readonly ILogger<PausedGroupState> _logger;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="PausedGroupState"/> class.
|
/// Initializes a new instance of the <see cref="PausedGroupState"/> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -29,7 +24,6 @@ namespace MediaBrowser.Controller.SyncPlay.GroupStates
|
||||||
public PausedGroupState(ILoggerFactory loggerFactory)
|
public PausedGroupState(ILoggerFactory loggerFactory)
|
||||||
: base(loggerFactory)
|
: base(loggerFactory)
|
||||||
{
|
{
|
||||||
_logger = LoggerFactory.CreateLogger<PausedGroupState>();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
|
|
|
@ -17,11 +17,6 @@ namespace MediaBrowser.Controller.SyncPlay.GroupStates
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
public class PlayingGroupState : AbstractGroupState
|
public class PlayingGroupState : AbstractGroupState
|
||||||
{
|
{
|
||||||
/// <summary>
|
|
||||||
/// The logger.
|
|
||||||
/// </summary>
|
|
||||||
private readonly ILogger<PlayingGroupState> _logger;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="PlayingGroupState"/> class.
|
/// Initializes a new instance of the <see cref="PlayingGroupState"/> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -29,7 +24,6 @@ namespace MediaBrowser.Controller.SyncPlay.GroupStates
|
||||||
public PlayingGroupState(ILoggerFactory loggerFactory)
|
public PlayingGroupState(ILoggerFactory loggerFactory)
|
||||||
: base(loggerFactory)
|
: base(loggerFactory)
|
||||||
{
|
{
|
||||||
_logger = LoggerFactory.CreateLogger<PlayingGroupState>();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
|
|
|
@ -15,22 +15,18 @@ namespace MediaBrowser.LocalMetadata.Images
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class InternalMetadataFolderImageProvider : ILocalImageProvider, IHasOrder
|
public class InternalMetadataFolderImageProvider : ILocalImageProvider, IHasOrder
|
||||||
{
|
{
|
||||||
private readonly IServerConfigurationManager _config;
|
|
||||||
private readonly IFileSystem _fileSystem;
|
private readonly IFileSystem _fileSystem;
|
||||||
private readonly ILogger<InternalMetadataFolderImageProvider> _logger;
|
private readonly ILogger<InternalMetadataFolderImageProvider> _logger;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="InternalMetadataFolderImageProvider"/> class.
|
/// Initializes a new instance of the <see cref="InternalMetadataFolderImageProvider"/> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="config">Instance of the <see cref="IServerConfigurationManager"/> interface.</param>
|
|
||||||
/// <param name="fileSystem">Instance of the <see cref="IFileSystem"/> interface.</param>
|
/// <param name="fileSystem">Instance of the <see cref="IFileSystem"/> interface.</param>
|
||||||
/// <param name="logger">Instance of the <see cref="ILogger{InternalMetadataFolderImageProvider}"/> interface.</param>
|
/// <param name="logger">Instance of the <see cref="ILogger{InternalMetadataFolderImageProvider}"/> interface.</param>
|
||||||
public InternalMetadataFolderImageProvider(
|
public InternalMetadataFolderImageProvider(
|
||||||
IServerConfigurationManager config,
|
|
||||||
IFileSystem fileSystem,
|
IFileSystem fileSystem,
|
||||||
ILogger<InternalMetadataFolderImageProvider> logger)
|
ILogger<InternalMetadataFolderImageProvider> logger)
|
||||||
{
|
{
|
||||||
_config = config;
|
|
||||||
_fileSystem = fileSystem;
|
_fileSystem = fileSystem;
|
||||||
_logger = logger;
|
_logger = logger;
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,7 +65,7 @@ namespace MediaBrowser.Providers.Plugins.Omdb
|
||||||
{
|
{
|
||||||
if (info.IndexNumber.HasValue && info.ParentIndexNumber.HasValue)
|
if (info.IndexNumber.HasValue && info.ParentIndexNumber.HasValue)
|
||||||
{
|
{
|
||||||
result.HasMetadata = await new OmdbProvider(_httpClientFactory, _fileSystem, _appHost, _configurationManager)
|
result.HasMetadata = await new OmdbProvider(_httpClientFactory, _fileSystem, _configurationManager)
|
||||||
.FetchEpisodeData(result, info.IndexNumber.Value, info.ParentIndexNumber.Value, info.GetProviderId(MetadataProvider.Imdb), seriesImdbId, info.MetadataLanguage, info.MetadataCountryCode, cancellationToken).ConfigureAwait(false);
|
.FetchEpisodeData(result, info.IndexNumber.Value, info.ParentIndexNumber.Value, info.GetProviderId(MetadataProvider.Imdb), seriesImdbId, info.MetadataLanguage, info.MetadataCountryCode, cancellationToken).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,6 @@ using System.Globalization;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using MediaBrowser.Common;
|
|
||||||
using MediaBrowser.Common.Net;
|
using MediaBrowser.Common.Net;
|
||||||
using MediaBrowser.Controller.Configuration;
|
using MediaBrowser.Controller.Configuration;
|
||||||
using MediaBrowser.Controller.Entities;
|
using MediaBrowser.Controller.Entities;
|
||||||
|
@ -25,14 +24,12 @@ namespace MediaBrowser.Providers.Plugins.Omdb
|
||||||
private readonly IHttpClientFactory _httpClientFactory;
|
private readonly IHttpClientFactory _httpClientFactory;
|
||||||
private readonly IFileSystem _fileSystem;
|
private readonly IFileSystem _fileSystem;
|
||||||
private readonly IServerConfigurationManager _configurationManager;
|
private readonly IServerConfigurationManager _configurationManager;
|
||||||
private readonly IApplicationHost _appHost;
|
|
||||||
|
|
||||||
public OmdbImageProvider(IApplicationHost appHost, IHttpClientFactory httpClientFactory, IFileSystem fileSystem, IServerConfigurationManager configurationManager)
|
public OmdbImageProvider(IHttpClientFactory httpClientFactory, IFileSystem fileSystem, IServerConfigurationManager configurationManager)
|
||||||
{
|
{
|
||||||
_httpClientFactory = httpClientFactory;
|
_httpClientFactory = httpClientFactory;
|
||||||
_fileSystem = fileSystem;
|
_fileSystem = fileSystem;
|
||||||
_configurationManager = configurationManager;
|
_configurationManager = configurationManager;
|
||||||
_appHost = appHost;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public string Name => "The Open Movie Database";
|
public string Name => "The Open Movie Database";
|
||||||
|
@ -55,7 +52,7 @@ namespace MediaBrowser.Providers.Plugins.Omdb
|
||||||
|
|
||||||
var list = new List<RemoteImageInfo>();
|
var list = new List<RemoteImageInfo>();
|
||||||
|
|
||||||
var provider = new OmdbProvider(_httpClientFactory, _fileSystem, _appHost, _configurationManager);
|
var provider = new OmdbProvider(_httpClientFactory, _fileSystem, _configurationManager);
|
||||||
|
|
||||||
if (!string.IsNullOrWhiteSpace(imdbId))
|
if (!string.IsNullOrWhiteSpace(imdbId))
|
||||||
{
|
{
|
||||||
|
|
|
@ -226,7 +226,7 @@ namespace MediaBrowser.Providers.Plugins.Omdb
|
||||||
result.Item.SetProviderId(MetadataProvider.Imdb, imdbId);
|
result.Item.SetProviderId(MetadataProvider.Imdb, imdbId);
|
||||||
result.HasMetadata = true;
|
result.HasMetadata = true;
|
||||||
|
|
||||||
await new OmdbProvider(_httpClientFactory, _fileSystem, _appHost, _configurationManager).Fetch(result, imdbId, info.MetadataLanguage, info.MetadataCountryCode, cancellationToken).ConfigureAwait(false);
|
await new OmdbProvider(_httpClientFactory, _fileSystem, _configurationManager).Fetch(result, imdbId, info.MetadataLanguage, info.MetadataCountryCode, cancellationToken).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
@ -258,7 +258,7 @@ namespace MediaBrowser.Providers.Plugins.Omdb
|
||||||
result.Item.SetProviderId(MetadataProvider.Imdb, imdbId);
|
result.Item.SetProviderId(MetadataProvider.Imdb, imdbId);
|
||||||
result.HasMetadata = true;
|
result.HasMetadata = true;
|
||||||
|
|
||||||
await new OmdbProvider(_httpClientFactory, _fileSystem, _appHost, _configurationManager).Fetch(result, imdbId, info.MetadataLanguage, info.MetadataCountryCode, cancellationToken).ConfigureAwait(false);
|
await new OmdbProvider(_httpClientFactory, _fileSystem, _configurationManager).Fetch(result, imdbId, info.MetadataLanguage, info.MetadataCountryCode, cancellationToken).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
|
|
@ -12,7 +12,6 @@ using System.Text.Json;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Jellyfin.Extensions.Json;
|
using Jellyfin.Extensions.Json;
|
||||||
using MediaBrowser.Common;
|
|
||||||
using MediaBrowser.Common.Net;
|
using MediaBrowser.Common.Net;
|
||||||
using MediaBrowser.Controller.Configuration;
|
using MediaBrowser.Controller.Configuration;
|
||||||
using MediaBrowser.Controller.Entities;
|
using MediaBrowser.Controller.Entities;
|
||||||
|
@ -28,20 +27,17 @@ namespace MediaBrowser.Providers.Plugins.Omdb
|
||||||
private readonly IFileSystem _fileSystem;
|
private readonly IFileSystem _fileSystem;
|
||||||
private readonly IServerConfigurationManager _configurationManager;
|
private readonly IServerConfigurationManager _configurationManager;
|
||||||
private readonly IHttpClientFactory _httpClientFactory;
|
private readonly IHttpClientFactory _httpClientFactory;
|
||||||
private readonly IApplicationHost _appHost;
|
|
||||||
private readonly JsonSerializerOptions _jsonOptions;
|
private readonly JsonSerializerOptions _jsonOptions;
|
||||||
|
|
||||||
/// <summary>Initializes a new instance of the <see cref="OmdbProvider"/> class.</summary>
|
/// <summary>Initializes a new instance of the <see cref="OmdbProvider"/> class.</summary>
|
||||||
/// <param name="httpClientFactory">HttpClientFactory to use for calls to OMDB service.</param>
|
/// <param name="httpClientFactory">HttpClientFactory to use for calls to OMDB service.</param>
|
||||||
/// <param name="fileSystem">IFileSystem to use for store OMDB data.</param>
|
/// <param name="fileSystem">IFileSystem to use for store OMDB data.</param>
|
||||||
/// <param name="appHost">IApplicationHost to use.</param>
|
|
||||||
/// <param name="configurationManager">IServerConfigurationManager to use.</param>
|
/// <param name="configurationManager">IServerConfigurationManager to use.</param>
|
||||||
public OmdbProvider(IHttpClientFactory httpClientFactory, IFileSystem fileSystem, IApplicationHost appHost, IServerConfigurationManager configurationManager)
|
public OmdbProvider(IHttpClientFactory httpClientFactory, IFileSystem fileSystem, IServerConfigurationManager configurationManager)
|
||||||
{
|
{
|
||||||
_httpClientFactory = httpClientFactory;
|
_httpClientFactory = httpClientFactory;
|
||||||
_fileSystem = fileSystem;
|
_fileSystem = fileSystem;
|
||||||
_configurationManager = configurationManager;
|
_configurationManager = configurationManager;
|
||||||
_appHost = appHost;
|
|
||||||
|
|
||||||
_jsonOptions = new JsonSerializerOptions(JsonDefaults.Options);
|
_jsonOptions = new JsonSerializerOptions(JsonDefaults.Options);
|
||||||
_jsonOptions.Converters.Add(new JsonOmdbNotAvailableStringConverter());
|
_jsonOptions.Converters.Add(new JsonOmdbNotAvailableStringConverter());
|
||||||
|
|
|
@ -15,8 +15,6 @@ namespace Rssdp.Infrastructure
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class SsdpDevicePublisher : DisposableManagedObjectBase, ISsdpDevicePublisher
|
public class SsdpDevicePublisher : DisposableManagedObjectBase, ISsdpDevicePublisher
|
||||||
{
|
{
|
||||||
private readonly INetworkManager _networkManager;
|
|
||||||
|
|
||||||
private ISsdpCommunicationsServer _CommsServer;
|
private ISsdpCommunicationsServer _CommsServer;
|
||||||
private string _OSName;
|
private string _OSName;
|
||||||
private string _OSVersion;
|
private string _OSVersion;
|
||||||
|
@ -38,19 +36,17 @@ namespace Rssdp.Infrastructure
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Default constructor.
|
/// Default constructor.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public SsdpDevicePublisher(ISsdpCommunicationsServer communicationsServer, INetworkManager networkManager,
|
public SsdpDevicePublisher(
|
||||||
string osName, string osVersion, bool sendOnlyMatchedHost)
|
ISsdpCommunicationsServer communicationsServer,
|
||||||
|
string osName,
|
||||||
|
string osVersion,
|
||||||
|
bool sendOnlyMatchedHost)
|
||||||
{
|
{
|
||||||
if (communicationsServer == null)
|
if (communicationsServer == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException(nameof(communicationsServer));
|
throw new ArgumentNullException(nameof(communicationsServer));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (networkManager == null)
|
|
||||||
{
|
|
||||||
throw new ArgumentNullException(nameof(networkManager));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (osName == null)
|
if (osName == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException(nameof(osName));
|
throw new ArgumentNullException(nameof(osName));
|
||||||
|
@ -77,7 +73,6 @@ namespace Rssdp.Infrastructure
|
||||||
_RecentSearchRequests = new Dictionary<string, SearchRequest>(StringComparer.OrdinalIgnoreCase);
|
_RecentSearchRequests = new Dictionary<string, SearchRequest>(StringComparer.OrdinalIgnoreCase);
|
||||||
_Random = new Random();
|
_Random = new Random();
|
||||||
|
|
||||||
_networkManager = networkManager;
|
|
||||||
_CommsServer = communicationsServer;
|
_CommsServer = communicationsServer;
|
||||||
_CommsServer.RequestReceived += CommsServer_RequestReceived;
|
_CommsServer.RequestReceived += CommsServer_RequestReceived;
|
||||||
_OSName = osName;
|
_OSName = osName;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user