2018-08-05 14:28:05 +00:00
|
|
|
|
using System.Collections.Generic;
|
2014-11-24 00:07:46 +00:00
|
|
|
|
using System.Linq;
|
2018-08-05 14:28:05 +00:00
|
|
|
|
using NzbDrone.Core.CustomFormats;
|
|
|
|
|
using NzbDrone.Core.Datastore;
|
2014-06-08 08:22:55 +00:00
|
|
|
|
using NzbDrone.Core.Parser;
|
|
|
|
|
using NzbDrone.Core.Qualities;
|
|
|
|
|
|
|
|
|
|
namespace NzbDrone.Core.Profiles
|
|
|
|
|
{
|
|
|
|
|
public class Profile : ModelBase
|
|
|
|
|
{
|
2018-08-05 14:28:05 +00:00
|
|
|
|
public Profile()
|
|
|
|
|
{
|
|
|
|
|
FormatItems = new List<ProfileFormatItem>();
|
|
|
|
|
}
|
|
|
|
|
|
2015-10-03 17:45:26 +00:00
|
|
|
|
public string Name { get; set; }
|
2014-06-08 08:22:55 +00:00
|
|
|
|
public Quality Cutoff { get; set; }
|
|
|
|
|
public List<ProfileQualityItem> Items { get; set; }
|
2018-08-05 14:28:05 +00:00
|
|
|
|
public CustomFormat FormatCutoff { get; set; }
|
|
|
|
|
public List<ProfileFormatItem> FormatItems { get; set; }
|
2017-01-27 19:01:28 +00:00
|
|
|
|
public List<string> PreferredTags { get; set; }
|
2014-06-08 08:22:55 +00:00
|
|
|
|
public Language Language { get; set; }
|
2014-11-24 00:07:46 +00:00
|
|
|
|
|
|
|
|
|
public Quality LastAllowedQuality()
|
|
|
|
|
{
|
|
|
|
|
return Items.Last(q => q.Allowed).Quality;
|
|
|
|
|
}
|
2014-06-08 08:22:55 +00:00
|
|
|
|
}
|
2014-11-24 00:07:46 +00:00
|
|
|
|
}
|