mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-14 11:40:42 +01:00
Consolidated handlers that return lists of items. Renamed ApiBaseItemWrapper to ApiBaseItemContainer. Added Person and Studio DTO's to BaseItemWrapper
This commit is contained in:
parent
5c094afd7e
commit
5c6ec34a9c
@@ -20,14 +20,14 @@ namespace MediaBrowser.Model.DTO
|
||||
/// <summary>
|
||||
/// This is the full return object when requesting an Item
|
||||
/// </summary>
|
||||
public class BaseItemWrapper<T>
|
||||
where T : BaseItem
|
||||
public class BaseItemContainer<TItemType>
|
||||
where TItemType : BaseItem
|
||||
{
|
||||
public T Item { get; set; }
|
||||
public TItemType Item { get; set; }
|
||||
|
||||
public UserItemData UserItemData { get; set; }
|
||||
|
||||
public IEnumerable<BaseItemWrapper<T>> Children { get; set; }
|
||||
public IEnumerable<BaseItemContainer<TItemType>> Children { get; set; }
|
||||
|
||||
public bool IsFolder { get; set; }
|
||||
|
||||
@@ -45,7 +45,8 @@ namespace MediaBrowser.Model.DTO
|
||||
return Type.Equals(type, StringComparison.OrdinalIgnoreCase);
|
||||
}
|
||||
|
||||
public IEnumerable<PersonInfo> People { 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.
|
||||
@@ -60,7 +61,7 @@ namespace MediaBrowser.Model.DTO
|
||||
/// <summary>
|
||||
/// This is strictly for convenience so the UI's don't have to use the verbose generic syntax of BaseItemWrapper<ApiBaseItem>
|
||||
/// </summary>
|
||||
public class ApiBaseItemWrapper : BaseItemWrapper<ApiBaseItem>
|
||||
public class ApiBaseItemContainer : BaseItemContainer<ApiBaseItem>
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
|
||||
namespace MediaBrowser.Model.DTO
|
||||
{
|
||||
/// <summary>
|
||||
/// This is a stub class used by the api to get IBN types along with their item counts
|
||||
/// </summary>
|
||||
public class CategoryInfo<T>
|
||||
{
|
||||
/// <summary>
|
||||
/// The actual genre, year, studio, etc
|
||||
/// </summary>
|
||||
public T Item { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The number of items that have the genre, year, studio, etc
|
||||
/// </summary>
|
||||
public int ItemCount { get; set; }
|
||||
}
|
||||
}
|
||||
38
MediaBrowser.Model/DTO/IBNItem.cs
Normal file
38
MediaBrowser.Model/DTO/IBNItem.cs
Normal file
@@ -0,0 +1,38 @@
|
||||
using MediaBrowser.Model.Entities;
|
||||
|
||||
namespace MediaBrowser.Model.DTO
|
||||
{
|
||||
/// <summary>
|
||||
/// This is a stub class used by the api to get IBN types along with their item counts
|
||||
/// </summary>
|
||||
public class IBNItem<T>
|
||||
{
|
||||
/// <summary>
|
||||
/// The actual genre, year, studio, etc
|
||||
/// </summary>
|
||||
public T Item { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The number of items that have the genre, year, studio, etc
|
||||
/// </summary>
|
||||
public int BaseItemCount { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This is used by BaseItemContainer
|
||||
/// </summary>
|
||||
public class BaseItemPerson
|
||||
{
|
||||
public PersonInfo PersonInfo { get; set; }
|
||||
public string PrimaryImagePath { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This is used by BaseItemContainer
|
||||
/// </summary>
|
||||
public class BaseItemStudio
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public string PrimaryImagePath { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user