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:
@@ -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; }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user