diff options
Diffstat (limited to 'MediaBrowser.Controller')
| -rw-r--r-- | MediaBrowser.Controller/Entities/Video.cs | 2 | ||||
| -rw-r--r-- | MediaBrowser.Controller/MediaInfo/MediaEncoderHelpers.cs | 19 |
2 files changed, 10 insertions, 11 deletions
diff --git a/MediaBrowser.Controller/Entities/Video.cs b/MediaBrowser.Controller/Entities/Video.cs index 0d1e22128..caf332a5b 100644 --- a/MediaBrowser.Controller/Entities/Video.cs +++ b/MediaBrowser.Controller/Entities/Video.cs @@ -136,7 +136,7 @@ namespace MediaBrowser.Controller.Entities get { return Video3DFormat.HasValue; } } - public bool IsHd + public bool IsHD { get { return MediaStreams != null && MediaStreams.Any(i => i.Type == MediaStreamType.Video && i.Width.HasValue && i.Width.Value >= 1280); } } diff --git a/MediaBrowser.Controller/MediaInfo/MediaEncoderHelpers.cs b/MediaBrowser.Controller/MediaInfo/MediaEncoderHelpers.cs index 4485c4072..8c2f7c219 100644 --- a/MediaBrowser.Controller/MediaInfo/MediaEncoderHelpers.cs +++ b/MediaBrowser.Controller/MediaInfo/MediaEncoderHelpers.cs @@ -1,5 +1,4 @@ -using MediaBrowser.Common.IO; -using MediaBrowser.Common.MediaInfo; +using MediaBrowser.Common.MediaInfo; using MediaBrowser.Controller.Entities; using MediaBrowser.Model.Entities; using MediaBrowser.Model.IO; @@ -64,17 +63,17 @@ namespace MediaBrowser.Controller.MediaInfo /// <summary> /// Gets the type of the input. /// </summary> - /// <param name="item">The item.</param> + /// <param name="path">The path.</param> + /// <param name="videoType">Type of the video.</param> + /// <param name="isoType">Type of the iso.</param> /// <returns>InputType.</returns> - public static InputType GetInputType(BaseItem item) + public static InputType GetInputType(string path, VideoType? videoType, IsoType? isoType) { var type = InputType.AudioFile; - var video = item as Video; - - if (video != null) + if (videoType.HasValue) { - switch (video.VideoType) + switch (videoType.Value) { case VideoType.BluRay: type = InputType.Bluray; @@ -83,9 +82,9 @@ namespace MediaBrowser.Controller.MediaInfo type = InputType.Dvd; break; case VideoType.Iso: - if (video.IsoType.HasValue) + if (isoType.HasValue) { - switch (video.IsoType.Value) + switch (isoType.Value) { case IsoType.BluRay: type = InputType.Bluray; |
