mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-20 09:04:42 +01:00
Added Video3DFormat property
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user