1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-04-18 21:35:51 -04:00

aFixed QualityProfile storage test

This commit is contained in:
Keivan
2010-09-29 23:59:00 -07:00
parent 27164d422c
commit 899e5a9a22
6 changed files with 69 additions and 10 deletions
+28 -2
View File
@@ -1,7 +1,9 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using SubSonic.SqlGeneration.Schema;
namespace NzbDrone.Core.Repository
{
@@ -9,7 +11,31 @@ namespace NzbDrone.Core.Repository
{
public int Id { get; set; }
public Quality Cutoff { get; set; }
public string Qualitys { get; set; }
public Quality[] Q { 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<Quality>(qualities.Length);
foreach (var quality in qualities)
{
Allowed.Add((Quality)Convert.ToInt32(quality));
}
}
}
[SubSonicIgnore]
public List<Quality> Allowed { get; set; }
}
}