From 02ebeb0e5bc85a62a395e5605b66b9b558c4e2c8 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sun, 29 Sep 2013 20:51:04 -0400 Subject: added logging during app update, and IsHD --- MediaBrowser.Controller/Entities/Video.cs | 2 +- .../MediaInfo/MediaEncoderHelpers.cs | 19 +++++++++---------- 2 files changed, 10 insertions(+), 11 deletions(-) (limited to 'MediaBrowser.Controller') 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 /// /// Gets the type of the input. /// - /// The item. + /// The path. + /// Type of the video. + /// Type of the iso. /// InputType. - 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; -- cgit v1.2.3