fixed episode parse, profile storage

This commit is contained in:
Keivan 2011-02-03 12:09:19 -08:00
commit 16fcda18c3
4 changed files with 48 additions and 11 deletions

View file

@ -12,9 +12,32 @@ namespace NzbDrone.Core.Repository.Quality
public string Name { get; set; }
public bool UserProfile { get; set; } //Allows us to tell the difference between default and user profiles
[SubSonicIgnore]
public List<QualityTypes> Allowed { get; set; }
public QualityTypes Cutoff { get; set; }
[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('|');
Allowed = new List<QualityTypes>(qualities.Length);
foreach (var quality in qualities)
{
Allowed.Add((QualityTypes)Convert.ToInt32(quality));
}
}
}
}
}