From 749a181fac6d4ebc77047d8b9dd262abe3bd40d5 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sat, 26 Aug 2017 15:50:02 -0400 Subject: [PATCH] fix video images not being created --- .../MediaEncoder/EncodingManager.cs | 5 +++++ MediaBrowser.Controller/Entities/Video.cs | 11 ++++++++++- .../MediaInfo/SubtitleDownloader.cs | 5 +++++ SharedVersion.cs | 2 +- 4 files changed, 21 insertions(+), 2 deletions(-) diff --git a/Emby.Server.Implementations/MediaEncoder/EncodingManager.cs b/Emby.Server.Implementations/MediaEncoder/EncodingManager.cs index 770b881d5..d8bf363f2 100644 --- a/Emby.Server.Implementations/MediaEncoder/EncodingManager.cs +++ b/Emby.Server.Implementations/MediaEncoder/EncodingManager.cs @@ -75,6 +75,11 @@ namespace Emby.Server.Implementations.MediaEncoder return false; } + if (!video.IsCompleteMedia) + { + return false; + } + // Can't extract images if there are no video streams return video.DefaultVideoStreamIndex.HasValue; } diff --git a/MediaBrowser.Controller/Entities/Video.cs b/MediaBrowser.Controller/Entities/Video.cs index 887da46cc..ffb601dc4 100644 --- a/MediaBrowser.Controller/Entities/Video.cs +++ b/MediaBrowser.Controller/Entities/Video.cs @@ -161,7 +161,10 @@ namespace MediaBrowser.Controller.Entities { videoType = VideoType.Dvd; } - + else + { + return new string[] { }; + } return MediaEncoder.GetPlayableStreamFileNames(Path, videoType); } @@ -265,6 +268,12 @@ namespace MediaBrowser.Controller.Entities return base.CanDelete(); } + [IgnoreDataMember] + public bool IsCompleteMedia + { + get { return !IsActiveRecording(); } + } + [IgnoreDataMember] protected virtual bool EnableDefaultVideoUserDataKeys { diff --git a/MediaBrowser.Providers/MediaInfo/SubtitleDownloader.cs b/MediaBrowser.Providers/MediaInfo/SubtitleDownloader.cs index 483d8827e..79e89a110 100644 --- a/MediaBrowser.Providers/MediaInfo/SubtitleDownloader.cs +++ b/MediaBrowser.Providers/MediaInfo/SubtitleDownloader.cs @@ -39,6 +39,11 @@ namespace MediaBrowser.Providers.MediaInfo return new List(); } + if (!video.IsCompleteMedia) + { + return new List(); + } + VideoContentType mediaType; if (video is Episode) diff --git a/SharedVersion.cs b/SharedVersion.cs index 7df5c83f0..a11328258 100644 --- a/SharedVersion.cs +++ b/SharedVersion.cs @@ -1,3 +1,3 @@ using System.Reflection; -[assembly: AssemblyVersion("3.2.28.6")] +[assembly: AssemblyVersion("3.2.28.7")]