From 5763ce5a425aa2216ec4cb7f1787a26cd6d5dd19 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Thu, 28 Jan 2016 20:15:59 -0500 Subject: [PATCH] catch BDInfo errors --- .../MediaInfo/FFProbeVideoInfo.cs | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/MediaBrowser.Providers/MediaInfo/FFProbeVideoInfo.cs b/MediaBrowser.Providers/MediaInfo/FFProbeVideoInfo.cs index efa6ff0cf..8094aa58d 100644 --- a/MediaBrowser.Providers/MediaInfo/FFProbeVideoInfo.cs +++ b/MediaBrowser.Providers/MediaInfo/FFProbeVideoInfo.cs @@ -213,7 +213,7 @@ namespace MediaBrowser.Providers.MediaInfo } var chapters = mediaInfo.Chapters ?? new List(); - if (video.VideoType == VideoType.BluRay || (video.IsoType.HasValue && video.IsoType.Value == IsoType.BluRay)) + if (blurayInfo != null) { FetchBdInfo(video, chapters, mediaStreams, blurayInfo); } @@ -360,7 +360,15 @@ namespace MediaBrowser.Providers.MediaInfo /// VideoStream. private BlurayDiscInfo GetBDInfo(string path) { - return _blurayExaminer.GetDiscInfo(path); + try + { + return _blurayExaminer.GetDiscInfo(path); + } + catch (Exception ex) + { + _logger.ErrorException("Error getting BDInfo", ex); + return null; + } } private void FetchEmbeddedInfo(Video video, Model.MediaInfo.MediaInfo data, MetadataRefreshOptions options) @@ -628,7 +636,7 @@ namespace MediaBrowser.Providers.MediaInfo FetchFromDvdLib(item, mount); } - if (item.VideoType == VideoType.BluRay || (item.IsoType.HasValue && item.IsoType.Value == IsoType.BluRay)) + if (blurayDiscInfo != null) { item.PlayableStreamFileNames = blurayDiscInfo.Files.ToList(); }