mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-07 13:32:17 -07:00
Deleting of Qualities now works.
Quality Settings UI looks better, colors, sizing Test files for testing different webUI features
This commit is contained in:
parent
2ba6057ec7
commit
4b4499b4a2
4 changed files with 76 additions and 18 deletions
|
@ -300,8 +300,17 @@ namespace NzbDrone.Web.Controllers
|
|||
{
|
||||
_configProvider.SetValue("DefaultQualityProfile", data.DefaultProfileId.ToString());
|
||||
|
||||
foreach (var dbProfile in _qualityProvider.GetAllProfiles().Where(q => q.UserProfile))
|
||||
{
|
||||
if (!data.UserProfiles.Exists(p => p.ProfileId == dbProfile.ProfileId))
|
||||
_qualityProvider.Delete(dbProfile.ProfileId);
|
||||
}
|
||||
|
||||
|
||||
foreach (var profile in data.UserProfiles)
|
||||
{
|
||||
Logger.Debug(String.Format("Updating User Profile: {0}", profile));
|
||||
|
||||
profile.Allowed = new List<QualityTypes>();
|
||||
foreach (var quality in profile.AllowedString.Split(','))
|
||||
{
|
||||
|
@ -311,7 +320,8 @@ namespace NzbDrone.Web.Controllers
|
|||
|
||||
//If the Cutoff value selected is not in the allowed list then use the last allowed value, this should be validated on submit
|
||||
if (!profile.Allowed.Contains(profile.Cutoff))
|
||||
profile.Cutoff = profile.Allowed.Last();
|
||||
throw new InvalidOperationException("Invalid Cutoff Value");
|
||||
//profile.Cutoff = profile.Allowed.Last();
|
||||
|
||||
if (profile.ProfileId > 0)
|
||||
_qualityProvider.Update(profile);
|
||||
|
@ -319,7 +329,6 @@ namespace NzbDrone.Web.Controllers
|
|||
else
|
||||
_qualityProvider.Add(profile);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
catch (Exception e)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue