mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 10:47:08 -07:00
quality Series.QualityProfile is lazyloaded.
This commit is contained in:
parent
d6d524e624
commit
016e360d1a
16 changed files with 154 additions and 72 deletions
|
@ -1,7 +1,4 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using NzbDrone.Core.Datastore;
|
||||
|
||||
namespace NzbDrone.Core.Qualities
|
||||
|
@ -10,32 +7,6 @@ namespace NzbDrone.Core.Qualities
|
|||
{
|
||||
public string Name { get; set; }
|
||||
public List<Quality> Allowed { get; set; }
|
||||
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
public string DbAllowed
|
||||
{
|
||||
get
|
||||
{
|
||||
string result = String.Empty;
|
||||
if (Allowed == null) return result;
|
||||
|
||||
foreach (var q in Allowed)
|
||||
{
|
||||
result += q.Id + "|";
|
||||
}
|
||||
return result.Trim('|');
|
||||
}
|
||||
private set
|
||||
{
|
||||
var qualities = value.Split('|');
|
||||
Allowed = new List<Quality>(qualities.Length);
|
||||
foreach (var quality in qualities.Where(q => !String.IsNullOrWhiteSpace(q)))
|
||||
{
|
||||
Allowed.Add(Quality.FindById(Convert.ToInt32(quality)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public Quality Cutoff { get; set; }
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue