New: Better interface for creating custom formats

This commit is contained in:
ta264
2020-02-18 21:03:05 +00:00
committed by Qstick
parent a5bac30ef3
commit 241bf85f15
74 changed files with 2259 additions and 1090 deletions

View File

@@ -11,22 +11,22 @@ namespace NzbDrone.Core.CustomFormats
{
}
public CustomFormat(string name, params string[] tags)
public CustomFormat(string name, params ICustomFormatSpecification[] specs)
{
Name = name;
FormatTags = tags.Select(t => new FormatTag(t)).ToList();
Specifications = specs.ToList();
}
public static CustomFormat None => new CustomFormat
{
Id = 0,
Name = "None",
FormatTags = new List<FormatTag>()
Specifications = new List<ICustomFormatSpecification>()
};
public string Name { get; set; }
public List<FormatTag> FormatTags { get; set; }
public List<ICustomFormatSpecification> Specifications { get; set; }
public override string ToString()
{