jellyfin-server/MediaBrowser.Model/Dto/DtoOptions.cs

34 lines
875 B
C#
Raw Normal View History

2014-11-30 19:01:33 +00:00
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; }
2014-12-21 01:23:56 +00:00
public bool EnableSettings { get; set; }
2014-11-30 19:01:33 +00:00
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;
}
}
}