update BdInfo probing

This commit is contained in:
Luke Pulverenti 2015-12-22 12:34:39 -05:00
parent d5a4a9424f
commit f6491c69fd
2 changed files with 41 additions and 42 deletions

View File

@ -304,8 +304,6 @@ namespace MediaBrowser.Controller.Entities
return base.IsValidFromResolver(newItem);
}
public string MainFeaturePlaylistName { get; set; }
/// <summary>
/// Gets the playable stream files.
/// </summary>

View File

@ -170,8 +170,7 @@ namespace MediaBrowser.Providers.MediaInfo
VideoType = item.VideoType,
MediaType = DlnaProfileType.Video,
InputPath = item.Path,
Protocol = protocol,
ExtractKeyFrameInterval = true
Protocol = protocol
}, cancellationToken).ConfigureAwait(false);
@ -298,6 +297,11 @@ namespace MediaBrowser.Providers.MediaInfo
{
var video = (Video)item;
video.PlayableStreamFileNames = blurayInfo.Files.ToList();
// Use BD Info if it has multiple m2ts. Otherwise, treat it like a video file and rely more on ffprobe output
if (blurayInfo.Files.Count > 1)
{
int? currentHeight = null;
int? currentWidth = null;
int? currentBitRate = null;
@ -316,15 +320,11 @@ namespace MediaBrowser.Providers.MediaInfo
mediaStreams.Clear();
mediaStreams.AddRange(blurayInfo.MediaStreams);
video.MainFeaturePlaylistName = blurayInfo.PlaylistName;
if (blurayInfo.RunTimeTicks.HasValue && blurayInfo.RunTimeTicks.Value > 0)
{
video.RunTimeTicks = blurayInfo.RunTimeTicks;
}
video.PlayableStreamFileNames = blurayInfo.Files.ToList();
if (blurayInfo.Chapters != null)
{
chapters.Clear();
@ -346,6 +346,7 @@ namespace MediaBrowser.Providers.MediaInfo
videoStream.Height = IsEmpty(videoStream.Height) ? currentHeight : videoStream.Height;
}
}
}
private bool IsEmpty(int? num)
{