Reworked CategoryInfo and added ImageType enum

This commit is contained in:
LukePulverenti Luke Pulverenti luke pulverenti
2012-07-30 15:03:07 -04:00
parent 45cde97a58
commit 7d48e20aea
9 changed files with 77 additions and 30 deletions

View File

@@ -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);
}
}
}

View File

@@ -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

View File

@@ -0,0 +1,13 @@

namespace MediaBrowser.Model.Entities
{
public enum ImageType
{
Primary,
Art,
Backdrop,
Banner,
Logo,
Thumbnail
}
}

View File

@@ -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" />