Added Video3DFormat property

This commit is contained in:
Luke Pulverenti
2013-06-25 14:10:39 -04:00
parent 640de9ef79
commit 07e230c2eb
14 changed files with 86 additions and 20 deletions

View File

@@ -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;

View File

@@ -39,6 +39,12 @@ namespace MediaBrowser.Controller.Entities
/// <value>The type of the iso.</value>
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>
@@ -101,7 +107,7 @@ namespace MediaBrowser.Controller.Entities
[IgnoreDataMember]
public bool Is3D
{
get { return VideoFormat > 0; }
get { return Video3DFormat.HasValue; }
}
/// <summary>

View File

@@ -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;
}
}
}
}