diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-06-25 14:10:39 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-06-25 14:10:39 -0400 |
| commit | 07e230c2eb9524c7c5e8a7fe0a021df3801d40b0 (patch) | |
| tree | 21983cceaac2182392a00a2c44e4bd18c76d1fcb /MediaBrowser.Controller | |
| parent | 640de9ef790847658c3cf595b5253eaec9ccad86 (diff) | |
Added Video3DFormat property
Diffstat (limited to 'MediaBrowser.Controller')
| -rw-r--r-- | MediaBrowser.Controller/Dto/DtoBuilder.cs | 2 | ||||
| -rw-r--r-- | MediaBrowser.Controller/Entities/Video.cs | 8 | ||||
| -rw-r--r-- | MediaBrowser.Controller/Resolvers/BaseVideoResolver.cs | 21 |
3 files changed, 28 insertions, 3 deletions
diff --git a/MediaBrowser.Controller/Dto/DtoBuilder.cs b/MediaBrowser.Controller/Dto/DtoBuilder.cs index 2bd338431..77559958a 100644 --- a/MediaBrowser.Controller/Dto/DtoBuilder.cs +++ b/MediaBrowser.Controller/Dto/DtoBuilder.cs @@ -449,7 +449,7 @@ namespace MediaBrowser.Controller.Dto if (video != null) { dto.VideoType = video.VideoType; - dto.VideoFormat = video.VideoFormat; + dto.Video3DFormat = video.Video3DFormat; dto.IsoType = video.IsoType; dto.PartCount = video.AdditionalPartIds.Count + 1; diff --git a/MediaBrowser.Controller/Entities/Video.cs b/MediaBrowser.Controller/Entities/Video.cs index 9df29cdfc..1fef52fa2 100644 --- a/MediaBrowser.Controller/Entities/Video.cs +++ b/MediaBrowser.Controller/Entities/Video.cs @@ -40,6 +40,12 @@ namespace MediaBrowser.Controller.Entities public IsoType? IsoType { get; set; } /// <summary> + /// Gets or sets the video3 D format. + /// </summary> + /// <value>The video3 D format.</value> + public Video3DFormat? Video3DFormat { get; set; } + + /// <summary> /// Gets or sets the format of the video. /// </summary> /// <value>The format of the video.</value> @@ -101,7 +107,7 @@ namespace MediaBrowser.Controller.Entities [IgnoreDataMember] public bool Is3D { - get { return VideoFormat > 0; } + get { return Video3DFormat.HasValue; } } /// <summary> diff --git a/MediaBrowser.Controller/Resolvers/BaseVideoResolver.cs b/MediaBrowser.Controller/Resolvers/BaseVideoResolver.cs index 3decbc0a4..0ed02c10f 100644 --- a/MediaBrowser.Controller/Resolvers/BaseVideoResolver.cs +++ b/MediaBrowser.Controller/Resolvers/BaseVideoResolver.cs @@ -62,7 +62,26 @@ namespace MediaBrowser.Controller.Resolvers { base.SetInitialItemValues(item, args); - item.VideoFormat = item.Path.IndexOf("[3d]", StringComparison.OrdinalIgnoreCase) != -1 ? VideoFormat.Digital3D : item.Path.IndexOf("[sbs3d]", StringComparison.OrdinalIgnoreCase) != -1 ? VideoFormat.Sbs3D : VideoFormat.Standard; + if (item.Path.IndexOf("[3d]", StringComparison.OrdinalIgnoreCase) != -1 || item.Path.IndexOf("[sbs3d]", StringComparison.OrdinalIgnoreCase) != -1) + { + item.Video3DFormat = Video3DFormat.HalfSideBySide; + } + else if (item.Path.IndexOf("[hsbs]", StringComparison.OrdinalIgnoreCase) != -1) + { + item.Video3DFormat = Video3DFormat.HalfSideBySide; + } + else if (item.Path.IndexOf("[fsbs]", StringComparison.OrdinalIgnoreCase) != -1) + { + item.Video3DFormat = Video3DFormat.FullSideBySide; + } + else if (item.Path.IndexOf("[ftab]", StringComparison.OrdinalIgnoreCase) != -1) + { + item.Video3DFormat = Video3DFormat.FullTopAndBottom; + } + else if (item.Path.IndexOf("[htab]", StringComparison.OrdinalIgnoreCase) != -1) + { + item.Video3DFormat = Video3DFormat.HalfTopAndBottom; + } } } } |
