2012-08-18 08:22:54 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using MediaBrowser.Model.Entities;
|
|
|
|
|
|
|
|
|
|
namespace MediaBrowser.Model.DTO
|
|
|
|
|
{
|
2012-08-18 16:27:34 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// This is strictly used as a data transfer object from the api layer.
|
|
|
|
|
/// This holds information about a BaseItem in a format that is convenient for the client.
|
|
|
|
|
/// </summary>
|
2012-08-18 08:22:54 +00:00
|
|
|
|
public class DTOBaseItem : IHasProviderIds
|
|
|
|
|
{
|
|
|
|
|
public string Name { get; set; }
|
|
|
|
|
public Guid Id { get; set; }
|
|
|
|
|
public DateTime DateCreated { get; set; }
|
|
|
|
|
|
|
|
|
|
public string SortName { get; set; }
|
|
|
|
|
public DateTime? PremiereDate { get; set; }
|
|
|
|
|
public string Path { get; set; }
|
|
|
|
|
public string OfficialRating { get; set; }
|
|
|
|
|
public string Overview { get; set; }
|
|
|
|
|
public IEnumerable<string> Taglines { get; set; }
|
|
|
|
|
|
|
|
|
|
public IEnumerable<string> Genres { get; set; }
|
|
|
|
|
|
|
|
|
|
public string DisplayMediaType { get; set; }
|
|
|
|
|
|
|
|
|
|
public float? UserRating { get; set; }
|
|
|
|
|
public long? RunTimeTicks { get; set; }
|
|
|
|
|
|
|
|
|
|
public string AspectRatio { get; set; }
|
|
|
|
|
public int? ProductionYear { get; set; }
|
|
|
|
|
|
|
|
|
|
public int? IndexNumber { get; set; }
|
2012-08-20 02:05:55 +00:00
|
|
|
|
public int? ParentIndexNumber { get; set; }
|
2012-08-18 08:22:54 +00:00
|
|
|
|
|
|
|
|
|
public string TrailerUrl { get; set; }
|
|
|
|
|
|
|
|
|
|
public Dictionary<string, string> ProviderIds { get; set; }
|
|
|
|
|
|
|
|
|
|
public bool HasBanner { get; set; }
|
|
|
|
|
public bool HasArt { get; set; }
|
|
|
|
|
public bool HasLogo { get; set; }
|
|
|
|
|
public bool HasThumb { get; set; }
|
|
|
|
|
public bool HasPrimaryImage { get; set; }
|
|
|
|
|
|
2012-08-20 02:05:55 +00:00
|
|
|
|
public string Language { get; set; }
|
|
|
|
|
|
2012-08-18 08:22:54 +00:00
|
|
|
|
public int BackdropCount { get; set; }
|
|
|
|
|
|
|
|
|
|
public IEnumerable<DTOBaseItem> Children { get; set; }
|
|
|
|
|
|
|
|
|
|
public bool IsFolder { get; set; }
|
|
|
|
|
|
2012-08-18 16:45:11 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// If the item is a Folder this will determine if it's the Root or not
|
|
|
|
|
/// </summary>
|
|
|
|
|
public bool? IsRoot { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// If the item is a Folder this will determine if it's a VF or not
|
|
|
|
|
/// </summary>
|
|
|
|
|
public bool? IsVirtualFolder { get; set; }
|
|
|
|
|
|
2012-08-18 08:22:54 +00:00
|
|
|
|
public Guid? ParentId { get; set; }
|
|
|
|
|
|
|
|
|
|
public string Type { get; set; }
|
|
|
|
|
|
|
|
|
|
public IEnumerable<BaseItemPerson> People { get; set; }
|
|
|
|
|
public IEnumerable<BaseItemStudio> Studios { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// If the item does not have a logo, this will hold the Id of the Parent that has one.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public Guid? ParentLogoItemId { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// If the item does not have any backdrops, this will hold the Id of the Parent that has one.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public Guid? ParentBackdropItemId { get; set; }
|
|
|
|
|
public int? ParentBackdropCount { get; set; }
|
|
|
|
|
|
2012-08-20 00:14:34 +00:00
|
|
|
|
public IEnumerable<DTOBaseItem> LocalTrailers { get; set; }
|
2012-08-18 08:22:54 +00:00
|
|
|
|
public int LocalTrailerCount { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// User data for this item based on the user it's being requested for
|
|
|
|
|
/// </summary>
|
|
|
|
|
public UserItemData UserData { get; set; }
|
|
|
|
|
|
|
|
|
|
public ItemSpecialCounts SpecialCounts { get; set; }
|
|
|
|
|
|
|
|
|
|
public bool IsType(Type type)
|
|
|
|
|
{
|
|
|
|
|
return IsType(type.Name);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public bool IsType(string type)
|
|
|
|
|
{
|
|
|
|
|
return Type.Equals(type, StringComparison.OrdinalIgnoreCase);
|
|
|
|
|
}
|
2012-08-19 17:00:52 +00:00
|
|
|
|
|
2012-08-19 17:02:26 +00:00
|
|
|
|
public bool IsNew { get; set; }
|
2012-08-18 08:22:54 +00:00
|
|
|
|
}
|
|
|
|
|
}
|