diff options
Diffstat (limited to 'MediaBrowser.Server.Implementations')
3 files changed, 34 insertions, 19 deletions
diff --git a/MediaBrowser.Server.Implementations/Dto/DtoService.cs b/MediaBrowser.Server.Implementations/Dto/DtoService.cs index b625c2d51..166d26b3c 100644 --- a/MediaBrowser.Server.Implementations/Dto/DtoService.cs +++ b/MediaBrowser.Server.Implementations/Dto/DtoService.cs @@ -1234,15 +1234,21 @@ namespace MediaBrowser.Server.Implementations.Dto Path = GetMappedPath(i), RunTimeTicks = i.RunTimeTicks, Video3DFormat = i.Video3DFormat, - VideoType = i.VideoType + VideoType = i.VideoType, + Container = i.Container, + Size = i.Size, + Formats = (i.FormatName ?? string.Empty).Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries).ToList() }; - if (i.VideoType == VideoType.VideoFile || i.VideoType == VideoType.Iso) + if (string.IsNullOrEmpty(info.Container)) { - var locationType = i.LocationType; - if (!string.IsNullOrWhiteSpace(i.Path) && locationType != LocationType.Remote && locationType != LocationType.Virtual) + if (i.VideoType == VideoType.VideoFile || i.VideoType == VideoType.Iso) { - info.Container = Path.GetExtension(i.Path).TrimStart('.'); + var locationType = i.LocationType; + if (!string.IsNullOrWhiteSpace(i.Path) && locationType != LocationType.Remote && locationType != LocationType.Virtual) + { + info.Container = Path.GetExtension(i.Path).TrimStart('.'); + } } } @@ -1265,13 +1271,19 @@ namespace MediaBrowser.Server.Implementations.Dto MediaStreams = _itemRepo.GetMediaStreams(new MediaStreamQuery { ItemId = i.Id }).ToList(), Name = i.Name, Path = GetMappedPath(i), - RunTimeTicks = i.RunTimeTicks + RunTimeTicks = i.RunTimeTicks, + Container = i.Container, + Size = i.Size, + Formats = (i.FormatName ?? string.Empty).Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries).ToList() }; - var locationType = i.LocationType; - if (!string.IsNullOrWhiteSpace(i.Path) && locationType != LocationType.Remote && locationType != LocationType.Virtual) + if (string.IsNullOrEmpty(info.Container)) { - info.Container = Path.GetExtension(i.Path).TrimStart('.'); + var locationType = i.LocationType; + if (!string.IsNullOrWhiteSpace(i.Path) && locationType != LocationType.Remote && locationType != LocationType.Virtual) + { + info.Container = Path.GetExtension(i.Path).TrimStart('.'); + } } var bitrate = info.MediaStreams.Where(m => m.Type == MediaStreamType.Audio).Select(m => m.BitRate ?? 0).Sum(); diff --git a/MediaBrowser.Server.Implementations/MediaEncoder/EncodingManager.cs b/MediaBrowser.Server.Implementations/MediaEncoder/EncodingManager.cs index 7237ffee5..470e58b66 100644 --- a/MediaBrowser.Server.Implementations/MediaEncoder/EncodingManager.cs +++ b/MediaBrowser.Server.Implementations/MediaEncoder/EncodingManager.cs @@ -158,15 +158,6 @@ namespace MediaBrowser.Server.Implementations.MediaEncoder continue; } - if (video.VideoType == VideoType.BluRay) - { - // Can only extract reliably on single file blurays - if (video.PlayableStreamFileNames == null || video.PlayableStreamFileNames.Count != 1) - { - continue; - } - } - // Add some time for the first chapter to make sure we don't end up with a black image var time = chapter.StartPositionTicks == 0 ? TimeSpan.FromTicks(Math.Min(FirstChapterTicks, video.RunTimeTicks ?? 0)) : TimeSpan.FromTicks(chapter.StartPositionTicks); diff --git a/MediaBrowser.Server.Implementations/Session/SessionManager.cs b/MediaBrowser.Server.Implementations/Session/SessionManager.cs index 2fc63039d..a05af246c 100644 --- a/MediaBrowser.Server.Implementations/Session/SessionManager.cs +++ b/MediaBrowser.Server.Implementations/Session/SessionManager.cs @@ -294,6 +294,7 @@ namespace MediaBrowser.Server.Implementations.Session session.PlayState.VolumeLevel = info.VolumeLevel; session.PlayState.AudioStreamIndex = info.AudioStreamIndex; session.PlayState.SubtitleStreamIndex = info.SubtitleStreamIndex; + session.PlayState.PlayMethod = info.PlayMethod; } /// <summary> @@ -1253,8 +1254,8 @@ namespace MediaBrowser.Server.Implementations.Session } var backropItem = item.HasImage(ImageType.Backdrop) ? item : null; - var thumbItem = item.HasImage(ImageType.Thumb) ? item : null; + var logoItem = item.HasImage(ImageType.Logo) ? item : null; if (thumbItem == null) { @@ -1292,6 +1293,11 @@ namespace MediaBrowser.Server.Implementations.Session thumbItem = item.Parents.FirstOrDefault(i => i.HasImage(ImageType.Thumb)); } + if (logoItem == null) + { + logoItem = item.Parents.FirstOrDefault(i => i.HasImage(ImageType.Logo)); + } + if (thumbItem != null) { info.ThumbImageTag = GetImageCacheTag(thumbItem, ImageType.Thumb); @@ -1304,6 +1310,12 @@ namespace MediaBrowser.Server.Implementations.Session info.BackdropItemId = GetDtoId(backropItem); } + if (logoItem != null) + { + info.LogoImageTag = GetImageCacheTag(logoItem, ImageType.Logo); + info.LogoItemId = GetDtoId(logoItem); + } + return info; } |
