pull person sort order from tvdb/tmdb data

This commit is contained in:
Luke Pulverenti
2013-11-19 22:15:48 -05:00
parent de339b8265
commit bce86c5022
14 changed files with 109 additions and 24 deletions

View File

@@ -483,6 +483,22 @@ namespace MediaBrowser.Controller.Entities
[IgnoreDataMember]
public Folder Parent { get; set; }
[IgnoreDataMember]
public IEnumerable<Folder> Parents
{
get
{
var parent = Parent;
while (parent != null)
{
yield return parent;
parent = parent.Parent;
}
}
}
/// <summary>
/// When the item first debuted. For movies this could be premiere date, episodes would be first aired
/// </summary>
@@ -630,11 +646,6 @@ namespace MediaBrowser.Controller.Entities
/// <value>The original run time ticks.</value>
public long? OriginalRunTimeTicks { get; set; }
/// <summary>
/// Gets or sets the aspect ratio.
/// </summary>
/// <value>The aspect ratio.</value>
public string AspectRatio { get; set; }
/// <summary>
/// Gets or sets the production year.
/// </summary>
/// <value>The production year.</value>

View File

@@ -0,0 +1,14 @@
namespace MediaBrowser.Controller.Entities
{
/// <summary>
/// Interface IHasAspectRatio
/// </summary>
public interface IHasAspectRatio
{
/// <summary>
/// Gets or sets the aspect ratio.
/// </summary>
/// <value>The aspect ratio.</value>
string AspectRatio { get; set; }
}
}

View File

@@ -49,6 +49,12 @@ namespace MediaBrowser.Controller.Entities
/// <value>The type.</value>
public string Type { get; set; }
/// <summary>
/// Gets or sets the sort order - ascending
/// </summary>
/// <value>The sort order.</value>
public int? SortOrder { get; set; }
/// <summary>
/// Returns a <see cref="System.String" /> that represents this instance.
/// </summary>

View File

@@ -14,7 +14,7 @@ namespace MediaBrowser.Controller.Entities
/// <summary>
/// Class Video
/// </summary>
public class Video : BaseItem, IHasMediaStreams
public class Video : BaseItem, IHasMediaStreams, IHasAspectRatio
{
public bool IsMultiPart { get; set; }
@@ -65,6 +65,12 @@ namespace MediaBrowser.Controller.Entities
return GetPlayableStreamFiles(Path);
}
/// <summary>
/// Gets or sets the aspect ratio.
/// </summary>
/// <value>The aspect ratio.</value>
public string AspectRatio { get; set; }
/// <summary>
/// Should be overridden to return the proper folder where metadata lives
/// </summary>