You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
using MediaBrowser.Model.Entities;
|
|
|
|
|
using MediaBrowser.Model.Querying;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
|
|
|
|
namespace MediaBrowser.Model.Dto
|
|
|
|
|
{
|
|
|
|
|
public class DtoOptions
|
|
|
|
|
{
|
|
|
|
|
public List<ItemFields> Fields { get; set; }
|
|
|
|
|
public List<ImageType> ImageTypes { get; set; }
|
|
|
|
|
public int ImageTypeLimit { get; set; }
|
|
|
|
|
public bool EnableImages { get; set; }
|
|
|
|
|
|
|
|
|
|
public DtoOptions()
|
|
|
|
|
{
|
|
|
|
|
Fields = new List<ItemFields>();
|
|
|
|
|
ImageTypes = new List<ImageType>();
|
|
|
|
|
ImageTypeLimit = int.MaxValue;
|
|
|
|
|
EnableImages = true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public int GetImageLimit(ImageType type)
|
|
|
|
|
{
|
|
|
|
|
if (EnableImages && ImageTypes.Contains(type))
|
|
|
|
|
{
|
|
|
|
|
return ImageTypeLimit;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|