|
@@ -33,13 +33,13 @@ namespace Emby.Server.Implementations.Library
|
|
private readonly ILibraryManager _libraryManager;
|
|
private readonly ILibraryManager _libraryManager;
|
|
private readonly IJsonSerializer _jsonSerializer;
|
|
private readonly IJsonSerializer _jsonSerializer;
|
|
private readonly IFileSystem _fileSystem;
|
|
private readonly IFileSystem _fileSystem;
|
|
-
|
|
|
|
- private IMediaSourceProvider[] _providers;
|
|
|
|
private readonly ILogger _logger;
|
|
private readonly ILogger _logger;
|
|
private readonly IUserDataManager _userDataManager;
|
|
private readonly IUserDataManager _userDataManager;
|
|
- private readonly Func<IMediaEncoder> _mediaEncoder;
|
|
|
|
- private ILocalizationManager _localizationManager;
|
|
|
|
- private IApplicationPaths _appPaths;
|
|
|
|
|
|
+ private readonly IMediaEncoder _mediaEncoder;
|
|
|
|
+ private readonly ILocalizationManager _localizationManager;
|
|
|
|
+ private readonly IApplicationPaths _appPaths;
|
|
|
|
+
|
|
|
|
+ private IMediaSourceProvider[] _providers;
|
|
|
|
|
|
public MediaSourceManager(
|
|
public MediaSourceManager(
|
|
IItemRepository itemRepo,
|
|
IItemRepository itemRepo,
|
|
@@ -47,16 +47,16 @@ namespace Emby.Server.Implementations.Library
|
|
ILocalizationManager localizationManager,
|
|
ILocalizationManager localizationManager,
|
|
IUserManager userManager,
|
|
IUserManager userManager,
|
|
ILibraryManager libraryManager,
|
|
ILibraryManager libraryManager,
|
|
- ILoggerFactory loggerFactory,
|
|
|
|
|
|
+ ILogger<MediaSourceManager> logger,
|
|
IJsonSerializer jsonSerializer,
|
|
IJsonSerializer jsonSerializer,
|
|
IFileSystem fileSystem,
|
|
IFileSystem fileSystem,
|
|
IUserDataManager userDataManager,
|
|
IUserDataManager userDataManager,
|
|
- Func<IMediaEncoder> mediaEncoder)
|
|
|
|
|
|
+ IMediaEncoder mediaEncoder)
|
|
{
|
|
{
|
|
_itemRepo = itemRepo;
|
|
_itemRepo = itemRepo;
|
|
_userManager = userManager;
|
|
_userManager = userManager;
|
|
_libraryManager = libraryManager;
|
|
_libraryManager = libraryManager;
|
|
- _logger = loggerFactory.CreateLogger(nameof(MediaSourceManager));
|
|
|
|
|
|
+ _logger = logger;
|
|
_jsonSerializer = jsonSerializer;
|
|
_jsonSerializer = jsonSerializer;
|
|
_fileSystem = fileSystem;
|
|
_fileSystem = fileSystem;
|
|
_userDataManager = userDataManager;
|
|
_userDataManager = userDataManager;
|
|
@@ -496,7 +496,7 @@ namespace Emby.Server.Implementations.Library
|
|
// hack - these two values were taken from LiveTVMediaSourceProvider
|
|
// hack - these two values were taken from LiveTVMediaSourceProvider
|
|
string cacheKey = request.OpenToken;
|
|
string cacheKey = request.OpenToken;
|
|
|
|
|
|
- await new LiveStreamHelper(_mediaEncoder(), _logger, _jsonSerializer, _appPaths)
|
|
|
|
|
|
+ await new LiveStreamHelper(_mediaEncoder, _logger, _jsonSerializer, _appPaths)
|
|
.AddMediaInfoWithProbe(mediaSource, isAudio, cacheKey, true, cancellationToken)
|
|
.AddMediaInfoWithProbe(mediaSource, isAudio, cacheKey, true, cancellationToken)
|
|
.ConfigureAwait(false);
|
|
.ConfigureAwait(false);
|
|
}
|
|
}
|
|
@@ -621,7 +621,7 @@ namespace Emby.Server.Implementations.Library
|
|
|
|
|
|
if (liveStreamInfo is IDirectStreamProvider)
|
|
if (liveStreamInfo is IDirectStreamProvider)
|
|
{
|
|
{
|
|
- var info = await _mediaEncoder().GetMediaInfo(new MediaInfoRequest
|
|
|
|
|
|
+ var info = await _mediaEncoder.GetMediaInfo(new MediaInfoRequest
|
|
{
|
|
{
|
|
MediaSource = mediaSource,
|
|
MediaSource = mediaSource,
|
|
ExtractChapters = false,
|
|
ExtractChapters = false,
|
|
@@ -674,7 +674,7 @@ namespace Emby.Server.Implementations.Library
|
|
mediaSource.AnalyzeDurationMs = 3000;
|
|
mediaSource.AnalyzeDurationMs = 3000;
|
|
}
|
|
}
|
|
|
|
|
|
- mediaInfo = await _mediaEncoder().GetMediaInfo(new MediaInfoRequest
|
|
|
|
|
|
+ mediaInfo = await _mediaEncoder.GetMediaInfo(new MediaInfoRequest
|
|
{
|
|
{
|
|
MediaSource = mediaSource,
|
|
MediaSource = mediaSource,
|
|
MediaType = isAudio ? DlnaProfileType.Audio : DlnaProfileType.Video,
|
|
MediaType = isAudio ? DlnaProfileType.Audio : DlnaProfileType.Video,
|