From 7835d690a1ade4739171036cff335c86b5232d0e Mon Sep 17 00:00:00 2001 From: LukePulverenti Luke Pulverenti luke pulverenti Date: Sat, 18 Aug 2012 04:22:54 -0400 Subject: Added a completely separate DTOBaseItem to remove the ApiBaseItemWrapper mess and shrink json output size. --- MediaBrowser.Model/DTO/DTOBaseItem.cs | 86 +++++++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 MediaBrowser.Model/DTO/DTOBaseItem.cs (limited to 'MediaBrowser.Model/DTO/DTOBaseItem.cs') diff --git a/MediaBrowser.Model/DTO/DTOBaseItem.cs b/MediaBrowser.Model/DTO/DTOBaseItem.cs new file mode 100644 index 000000000..6f41ac578 --- /dev/null +++ b/MediaBrowser.Model/DTO/DTOBaseItem.cs @@ -0,0 +1,86 @@ +using System; +using System.Collections.Generic; +using MediaBrowser.Model.Entities; + +namespace MediaBrowser.Model.DTO +{ + 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 Taglines { get; set; } + + public IEnumerable 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; } + + public string TrailerUrl { get; set; } + + public Dictionary 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; } + + public int BackdropCount { get; set; } + + public IEnumerable Children { get; set; } + + public bool IsFolder { get; set; } + + public Guid? ParentId { get; set; } + + public string Type { get; set; } + + public IEnumerable People { get; set; } + public IEnumerable Studios { get; set; } + + /// + /// If the item does not have a logo, this will hold the Id of the Parent that has one. + /// + public Guid? ParentLogoItemId { get; set; } + + /// + /// If the item does not have any backdrops, this will hold the Id of the Parent that has one. + /// + public Guid? ParentBackdropItemId { get; set; } + public int? ParentBackdropCount { get; set; } + + public IEnumerable