mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-12 10:40:24 +01:00
Made BaseJsonHandler strongly typed. Moved DTO entities to their own DTO namespace in Model.
This commit is contained in:
parent
8a2e0badae
commit
5c094afd7e
@@ -1,8 +1,9 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using MediaBrowser.Model.Entities;
|
||||
using MediaBrowser.Model.Users;
|
||||
|
||||
namespace MediaBrowser.Model.Entities
|
||||
namespace MediaBrowser.Model.DTO
|
||||
{
|
||||
/// <summary>
|
||||
/// This is a concrete class that the UI can use to deserialize
|
||||
@@ -10,7 +11,7 @@ namespace MediaBrowser.Model.Entities
|
||||
/// </summary>
|
||||
public class ApiBaseItem : BaseItem
|
||||
{
|
||||
// TV Series
|
||||
// Series properties
|
||||
public string Status { get; set; }
|
||||
public IEnumerable<DayOfWeek> AirDays { get; set; }
|
||||
public string AirTime { get; set; }
|
||||
@@ -19,14 +20,14 @@ namespace MediaBrowser.Model.Entities
|
||||
/// <summary>
|
||||
/// This is the full return object when requesting an Item
|
||||
/// </summary>
|
||||
public class ApiBaseItemWrapper<T>
|
||||
public class BaseItemWrapper<T>
|
||||
where T : BaseItem
|
||||
{
|
||||
public T Item { get; set; }
|
||||
|
||||
public UserItemData UserItemData { get; set; }
|
||||
|
||||
public IEnumerable<ApiBaseItemWrapper<T>> Children { get; set; }
|
||||
public IEnumerable<BaseItemWrapper<T>> Children { get; set; }
|
||||
|
||||
public bool IsFolder { get; set; }
|
||||
|
||||
@@ -55,4 +56,11 @@ namespace MediaBrowser.Model.Entities
|
||||
|
||||
public int? ParentBackdropCount { get; set; }
|
||||
}
|
||||
|
||||
/// <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>
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
namespace 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
|
||||
@@ -1,6 +1,6 @@
|
||||
using System;
|
||||
|
||||
namespace MediaBrowser.Model.Plugins
|
||||
namespace MediaBrowser.Model.DTO
|
||||
{
|
||||
/// <summary>
|
||||
/// This is a serializable stub class that is used by the api to provide information about installed plugins.
|
||||
@@ -26,9 +26,9 @@ namespace MediaBrowser.Model.Entities
|
||||
public IEnumerable<string> BackdropImagePaths { get; set; }
|
||||
|
||||
public string OfficialRating { get; set; }
|
||||
|
||||
|
||||
[IgnoreDataMember]
|
||||
public string CustomRating { get; set; }
|
||||
public string CustomPin { get; set; }
|
||||
|
||||
public string Overview { get; set; }
|
||||
public string Tagline { get; set; }
|
||||
|
||||
@@ -33,11 +33,11 @@
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Configuration\UserConfiguration.cs" />
|
||||
<Compile Include="Entities\ApiBaseItem.cs" />
|
||||
<Compile Include="DTO\ApiBaseItem.cs" />
|
||||
<Compile Include="Entities\Audio.cs" />
|
||||
<Compile Include="Entities\BaseEntity.cs" />
|
||||
<Compile Include="Entities\BaseItem.cs" />
|
||||
<Compile Include="Entities\CategoryInfo.cs" />
|
||||
<Compile Include="DTO\CategoryInfo.cs" />
|
||||
<Compile Include="Entities\Folder.cs" />
|
||||
<Compile Include="Entities\Genre.cs" />
|
||||
<Compile Include="Entities\ImageType.cs" />
|
||||
@@ -47,7 +47,7 @@
|
||||
<Compile Include="Entities\Video.cs" />
|
||||
<Compile Include="Entities\Year.cs" />
|
||||
<Compile Include="Plugins\BasePluginConfiguration.cs" />
|
||||
<Compile Include="Plugins\PluginInfo.cs" />
|
||||
<Compile Include="DTO\PluginInfo.cs" />
|
||||
<Compile Include="Progress\TaskProgress.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Users\User.cs" />
|
||||
|
||||
Reference in New Issue
Block a user