From db315c4e3279a0f7c5fd5507887b32c6436b90af Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sat, 5 Aug 2017 15:02:33 -0400 Subject: update media source methods --- .../MediaEncoder/EncodingManager.cs | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'Emby.Server.Implementations/MediaEncoder/EncodingManager.cs') diff --git a/Emby.Server.Implementations/MediaEncoder/EncodingManager.cs b/Emby.Server.Implementations/MediaEncoder/EncodingManager.cs index e4eb41e3a..181a49034 100644 --- a/Emby.Server.Implementations/MediaEncoder/EncodingManager.cs +++ b/Emby.Server.Implementations/MediaEncoder/EncodingManager.cs @@ -29,9 +29,9 @@ namespace Emby.Server.Implementations.MediaEncoder private readonly IChapterManager _chapterManager; private readonly ILibraryManager _libraryManager; - public EncodingManager(IFileSystem fileSystem, - ILogger logger, - IMediaEncoder encoder, + public EncodingManager(IFileSystem fileSystem, + ILogger logger, + IMediaEncoder encoder, IChapterManager chapterManager, ILibraryManager libraryManager) { _fileSystem = fileSystem; @@ -121,12 +121,16 @@ namespace Emby.Server.Implementations.MediaEncoder { continue; } + + List playableStreamFileNames = null; if (video.VideoType == VideoType.BluRay || video.VideoType == VideoType.Dvd) { - if (video.PlayableStreamFileNames.Count != 1) - { - continue; - } + continue; + } + + if (playableStreamFileNames == null) + { + playableStreamFileNames = new List(); } try @@ -136,7 +140,7 @@ namespace Emby.Server.Implementations.MediaEncoder var protocol = MediaProtocol.File; - var inputPath = MediaEncoderHelpers.GetInputArgument(_fileSystem, video.Path, protocol, null, video.PlayableStreamFileNames); + var inputPath = MediaEncoderHelpers.GetInputArgument(_fileSystem, video.Path, protocol, null, playableStreamFileNames); _fileSystem.CreateDirectory(_fileSystem.GetDirectoryName(path)); @@ -151,7 +155,7 @@ namespace Emby.Server.Implementations.MediaEncoder } catch { - + } chapter.ImagePath = path; -- cgit v1.2.3