2010-09-29 17:19:18 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
2010-09-30 06:59:00 +00:00
|
|
|
|
using System.ComponentModel;
|
|
|
|
|
using SubSonic.SqlGeneration.Schema;
|
2010-09-29 17:19:18 +00:00
|
|
|
|
|
2010-10-08 03:35:04 +00:00
|
|
|
|
namespace NzbDrone.Core.Entities.Quality
|
2010-09-29 17:19:18 +00:00
|
|
|
|
{
|
|
|
|
|
public class QualityProfile
|
|
|
|
|
{
|
|
|
|
|
public int Id { get; set; }
|
2010-10-01 00:09:22 +00:00
|
|
|
|
public QualityTypes Cutoff { get; set; }
|
2010-09-30 06:59:00 +00:00
|
|
|
|
|
|
|
|
|
[EditorBrowsable(EditorBrowsableState.Never)]
|
|
|
|
|
public string SonicAllowed
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
string result = String.Empty;
|
|
|
|
|
foreach (var q in Allowed)
|
|
|
|
|
{
|
|
|
|
|
result += (int)q + "|";
|
|
|
|
|
}
|
|
|
|
|
return result.Trim('|');
|
|
|
|
|
}
|
|
|
|
|
private set
|
|
|
|
|
{
|
|
|
|
|
var qualities = value.Split('|');
|
2010-10-01 00:09:22 +00:00
|
|
|
|
Allowed = new List<QualityTypes>(qualities.Length);
|
2010-09-30 06:59:00 +00:00
|
|
|
|
foreach (var quality in qualities)
|
|
|
|
|
{
|
2010-10-01 00:09:22 +00:00
|
|
|
|
Allowed.Add((QualityTypes)Convert.ToInt32(quality));
|
2010-09-30 06:59:00 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[SubSonicIgnore]
|
2010-10-01 00:09:22 +00:00
|
|
|
|
public List<QualityTypes> Allowed { get; set; }
|
2010-09-29 17:19:18 +00:00
|
|
|
|
}
|
|
|
|
|
}
|