|
|
@ -19,6 +19,7 @@ using MediaBrowser.Model.MediaInfo;
|
|
|
|
using MediaBrowser.Model.Serialization;
|
|
|
|
using MediaBrowser.Model.Serialization;
|
|
|
|
using MediaBrowser.Model.Services;
|
|
|
|
using MediaBrowser.Model.Services;
|
|
|
|
using MediaBrowser.Model.System;
|
|
|
|
using MediaBrowser.Model.System;
|
|
|
|
|
|
|
|
using Microsoft.Extensions.Logging;
|
|
|
|
|
|
|
|
|
|
|
|
namespace MediaBrowser.Api.Playback
|
|
|
|
namespace MediaBrowser.Api.Playback
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -75,7 +76,24 @@ namespace MediaBrowser.Api.Playback
|
|
|
|
[Authenticated]
|
|
|
|
[Authenticated]
|
|
|
|
public class UniversalAudioService : BaseApiService
|
|
|
|
public class UniversalAudioService : BaseApiService
|
|
|
|
{
|
|
|
|
{
|
|
|
|
public UniversalAudioService(IServerConfigurationManager serverConfigurationManager, IUserManager userManager, ILibraryManager libraryManager, IIsoManager isoManager, IMediaEncoder mediaEncoder, IFileSystem fileSystem, IDlnaManager dlnaManager, IDeviceManager deviceManager, ISubtitleEncoder subtitleEncoder, IMediaSourceManager mediaSourceManager, IZipClient zipClient, IJsonSerializer jsonSerializer, IAuthorizationContext authorizationContext, IImageProcessor imageProcessor, INetworkManager networkManager, IEnvironmentInfo environmentInfo)
|
|
|
|
public UniversalAudioService(
|
|
|
|
|
|
|
|
IServerConfigurationManager serverConfigurationManager,
|
|
|
|
|
|
|
|
IUserManager userManager,
|
|
|
|
|
|
|
|
ILibraryManager libraryManager,
|
|
|
|
|
|
|
|
IIsoManager isoManager,
|
|
|
|
|
|
|
|
IMediaEncoder mediaEncoder,
|
|
|
|
|
|
|
|
IFileSystem fileSystem,
|
|
|
|
|
|
|
|
IDlnaManager dlnaManager,
|
|
|
|
|
|
|
|
IDeviceManager deviceManager,
|
|
|
|
|
|
|
|
ISubtitleEncoder subtitleEncoder,
|
|
|
|
|
|
|
|
IMediaSourceManager mediaSourceManager,
|
|
|
|
|
|
|
|
IZipClient zipClient,
|
|
|
|
|
|
|
|
IJsonSerializer jsonSerializer,
|
|
|
|
|
|
|
|
IAuthorizationContext authorizationContext,
|
|
|
|
|
|
|
|
IImageProcessor imageProcessor,
|
|
|
|
|
|
|
|
INetworkManager networkManager,
|
|
|
|
|
|
|
|
IEnvironmentInfo environmentInfo,
|
|
|
|
|
|
|
|
ILoggerFactory loggerFactory)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
ServerConfigurationManager = serverConfigurationManager;
|
|
|
|
ServerConfigurationManager = serverConfigurationManager;
|
|
|
|
UserManager = userManager;
|
|
|
|
UserManager = userManager;
|
|
|
@ -93,6 +111,8 @@ namespace MediaBrowser.Api.Playback
|
|
|
|
ImageProcessor = imageProcessor;
|
|
|
|
ImageProcessor = imageProcessor;
|
|
|
|
NetworkManager = networkManager;
|
|
|
|
NetworkManager = networkManager;
|
|
|
|
EnvironmentInfo = environmentInfo;
|
|
|
|
EnvironmentInfo = environmentInfo;
|
|
|
|
|
|
|
|
_loggerFactory = loggerFactory;
|
|
|
|
|
|
|
|
_logger = loggerFactory.CreateLogger(nameof(UniversalAudioService));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
protected IServerConfigurationManager ServerConfigurationManager { get; private set; }
|
|
|
|
protected IServerConfigurationManager ServerConfigurationManager { get; private set; }
|
|
|
@ -111,6 +131,8 @@ namespace MediaBrowser.Api.Playback
|
|
|
|
protected IImageProcessor ImageProcessor { get; private set; }
|
|
|
|
protected IImageProcessor ImageProcessor { get; private set; }
|
|
|
|
protected INetworkManager NetworkManager { get; private set; }
|
|
|
|
protected INetworkManager NetworkManager { get; private set; }
|
|
|
|
protected IEnvironmentInfo EnvironmentInfo { get; private set; }
|
|
|
|
protected IEnvironmentInfo EnvironmentInfo { get; private set; }
|
|
|
|
|
|
|
|
private ILoggerFactory _loggerFactory;
|
|
|
|
|
|
|
|
private ILogger _logger;
|
|
|
|
|
|
|
|
|
|
|
|
public Task<object> Get(GetUniversalAudioStream request)
|
|
|
|
public Task<object> Get(GetUniversalAudioStream request)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -221,7 +243,7 @@ namespace MediaBrowser.Api.Playback
|
|
|
|
|
|
|
|
|
|
|
|
AuthorizationContext.GetAuthorizationInfo(Request).DeviceId = request.DeviceId;
|
|
|
|
AuthorizationContext.GetAuthorizationInfo(Request).DeviceId = request.DeviceId;
|
|
|
|
|
|
|
|
|
|
|
|
var mediaInfoService = new MediaInfoService(MediaSourceManager, DeviceManager, LibraryManager, ServerConfigurationManager, NetworkManager, MediaEncoder, UserManager, JsonSerializer, AuthorizationContext)
|
|
|
|
var mediaInfoService = new MediaInfoService(MediaSourceManager, DeviceManager, LibraryManager, ServerConfigurationManager, NetworkManager, MediaEncoder, UserManager, JsonSerializer, AuthorizationContext, _loggerFactory)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Request = Request
|
|
|
|
Request = Request
|
|
|
|
};
|
|
|
|
};
|
|
|
|