mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-01-15 23:58:57 +00:00
Reworked CategoryInfo and added ImageType enum
This commit is contained in:
parent
45cde97a58
commit
7d48e20aea
@@ -1,4 +1,5 @@
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using MediaBrowser.Model.Users;
|
||||
|
||||
namespace MediaBrowser.Model.Entities
|
||||
@@ -26,5 +27,15 @@ namespace MediaBrowser.Model.Entities
|
||||
public bool IsFolder { get; set; }
|
||||
|
||||
public string Type { get; set; }
|
||||
|
||||
public bool IsType(Type type)
|
||||
{
|
||||
return IsType(type.Name);
|
||||
}
|
||||
|
||||
public bool IsType(string type)
|
||||
{
|
||||
return Type.Equals(type, StringComparison.OrdinalIgnoreCase);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,16 +2,14 @@
|
||||
namespace MediaBrowser.Model.Entities
|
||||
{
|
||||
/// <summary>
|
||||
/// This is a stub class used by the api to get IBN types in a compact format
|
||||
/// This is a stub class used by the api to get IBN types along with their item counts
|
||||
/// </summary>
|
||||
public class CategoryInfo
|
||||
public class CategoryInfo<T>
|
||||
{
|
||||
/// <summary>
|
||||
/// The name of the genre, year, studio, etc
|
||||
/// The actual genre, year, studio, etc
|
||||
/// </summary>
|
||||
public string Name { get; set; }
|
||||
|
||||
public string PrimaryImagePath { get; set; }
|
||||
public T Item { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The number of items that have the genre, year, studio, etc
|
||||
|
||||
13
MediaBrowser.Model/Entities/ImageType.cs
Normal file
13
MediaBrowser.Model/Entities/ImageType.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
|
||||
namespace MediaBrowser.Model.Entities
|
||||
{
|
||||
public enum ImageType
|
||||
{
|
||||
Primary,
|
||||
Art,
|
||||
Backdrop,
|
||||
Banner,
|
||||
Logo,
|
||||
Thumbnail
|
||||
}
|
||||
}
|
||||
@@ -47,6 +47,7 @@
|
||||
<Compile Include="Entities\CategoryInfo.cs" />
|
||||
<Compile Include="Entities\Folder.cs" />
|
||||
<Compile Include="Entities\Genre.cs" />
|
||||
<Compile Include="Entities\ImageType.cs" />
|
||||
<Compile Include="Entities\Person.cs" />
|
||||
<Compile Include="Entities\Studio.cs" />
|
||||
<Compile Include="Entities\Video.cs" />
|
||||
|
||||
Reference in New Issue
Block a user