catch BDInfo errors

This commit is contained in:
Luke Pulverenti 2016-01-28 20:15:59 -05:00
parent f08084920c
commit 5763ce5a42

View File

@ -213,7 +213,7 @@ namespace MediaBrowser.Providers.MediaInfo
} }
var chapters = mediaInfo.Chapters ?? new List<ChapterInfo>(); var chapters = mediaInfo.Chapters ?? new List<ChapterInfo>();
if (video.VideoType == VideoType.BluRay || (video.IsoType.HasValue && video.IsoType.Value == IsoType.BluRay)) if (blurayInfo != null)
{ {
FetchBdInfo(video, chapters, mediaStreams, blurayInfo); FetchBdInfo(video, chapters, mediaStreams, blurayInfo);
} }
@ -359,9 +359,17 @@ namespace MediaBrowser.Providers.MediaInfo
/// <param name="path">The path.</param> /// <param name="path">The path.</param>
/// <returns>VideoStream.</returns> /// <returns>VideoStream.</returns>
private BlurayDiscInfo GetBDInfo(string path) private BlurayDiscInfo GetBDInfo(string path)
{
try
{ {
return _blurayExaminer.GetDiscInfo(path); 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) private void FetchEmbeddedInfo(Video video, Model.MediaInfo.MediaInfo data, MetadataRefreshOptions options)
{ {
@ -628,7 +636,7 @@ namespace MediaBrowser.Providers.MediaInfo
FetchFromDvdLib(item, mount); FetchFromDvdLib(item, mount);
} }
if (item.VideoType == VideoType.BluRay || (item.IsoType.HasValue && item.IsoType.Value == IsoType.BluRay)) if (blurayDiscInfo != null)
{ {
item.PlayableStreamFileNames = blurayDiscInfo.Files.ToList(); item.PlayableStreamFileNames = blurayDiscInfo.Files.ToList();
} }