2012-07-30 19:03:07 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
2012-08-17 13:16:50 +00:00
|
|
|
|
using MediaBrowser.Model.Entities;
|
2012-07-20 02:22:44 +00:00
|
|
|
|
using MediaBrowser.Model.Users;
|
|
|
|
|
|
2012-08-17 13:16:50 +00:00
|
|
|
|
namespace MediaBrowser.Model.DTO
|
2012-07-20 02:22:44 +00:00
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// This is a concrete class that the UI can use to deserialize
|
|
|
|
|
/// It is flat in the sense that it will be used regardless of the type of BaseItem involved
|
|
|
|
|
/// </summary>
|
|
|
|
|
public class ApiBaseItem : BaseItem
|
|
|
|
|
{
|
2012-08-17 13:16:50 +00:00
|
|
|
|
// Series properties
|
2012-08-11 19:28:38 +00:00
|
|
|
|
public string Status { get; set; }
|
|
|
|
|
public IEnumerable<DayOfWeek> AirDays { get; set; }
|
|
|
|
|
public string AirTime { get; set; }
|
2012-07-20 02:22:44 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// This is the full return object when requesting an Item
|
|
|
|
|
/// </summary>
|
2012-08-17 16:47:35 +00:00
|
|
|
|
public class BaseItemContainer<TItemType>
|
|
|
|
|
where TItemType : BaseItem
|
2012-07-20 02:22:44 +00:00
|
|
|
|
{
|
2012-08-17 16:47:35 +00:00
|
|
|
|
public TItemType Item { get; set; }
|
2012-07-20 02:22:44 +00:00
|
|
|
|
|
|
|
|
|
public UserItemData UserItemData { get; set; }
|
|
|
|
|
|
2012-08-17 16:47:35 +00:00
|
|
|
|
public IEnumerable<BaseItemContainer<TItemType>> Children { get; set; }
|
2012-07-20 02:22:44 +00:00
|
|
|
|
|
2012-07-29 15:19:25 +00:00
|
|
|
|
public bool IsFolder { get; set; }
|
2012-07-20 02:22:44 +00:00
|
|
|
|
|
2012-08-01 17:20:22 +00:00
|
|
|
|
public Guid? ParentId { get; set; }
|
2012-08-01 01:48:51 +00:00
|
|
|
|
|
2012-07-29 15:19:25 +00:00
|
|
|
|
public string Type { get; set; }
|
2012-07-30 19:03:07 +00:00
|
|
|
|
|
|
|
|
|
public bool IsType(Type type)
|
|
|
|
|
{
|
|
|
|
|
return IsType(type.Name);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public bool IsType(string type)
|
|
|
|
|
{
|
|
|
|
|
return Type.Equals(type, StringComparison.OrdinalIgnoreCase);
|
|
|
|
|
}
|
2012-08-01 17:20:22 +00:00
|
|
|
|
|
2012-08-17 16:47:35 +00:00
|
|
|
|
public IEnumerable<BaseItemPerson> People { get; set; }
|
|
|
|
|
public IEnumerable<BaseItemStudio> Studios { get; set; }
|
2012-08-15 13:20:29 +00:00
|
|
|
|
|
2012-08-01 17:20:22 +00:00
|
|
|
|
/// <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; }
|
2012-08-03 15:54:05 +00:00
|
|
|
|
|
|
|
|
|
public Guid? ParentBackdropItemId { get; set; }
|
|
|
|
|
|
|
|
|
|
public int? ParentBackdropCount { get; set; }
|
2012-07-20 02:22:44 +00:00
|
|
|
|
}
|
2012-08-17 13:16:50 +00:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// This is strictly for convenience so the UI's don't have to use the verbose generic syntax of BaseItemWrapper<ApiBaseItem>
|
|
|
|
|
/// </summary>
|
2012-08-17 16:47:35 +00:00
|
|
|
|
public class ApiBaseItemContainer : BaseItemContainer<ApiBaseItem>
|
2012-08-17 13:16:50 +00:00
|
|
|
|
{
|
|
|
|
|
}
|
2012-07-20 02:22:44 +00:00
|
|
|
|
}
|