|
|
|
@ -303,6 +303,8 @@ namespace NzbDrone.Web.Controllers
|
|
|
|
|
public ActionResult SaveQuality(QualityModel data)
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
if (ModelState.IsValid)
|
|
|
|
|
{
|
|
|
|
|
_configProvider.SetValue("DefaultQualityProfile", data.DefaultProfileId.ToString());
|
|
|
|
|
|
|
|
|
@ -312,7 +314,6 @@ namespace NzbDrone.Web.Controllers
|
|
|
|
|
_qualityProvider.Delete(dbProfile.ProfileId);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
foreach (var profile in data.UserProfiles)
|
|
|
|
|
{
|
|
|
|
|
Logger.Debug(String.Format("Updating User Profile: {0}", profile));
|
|
|
|
@ -320,7 +321,7 @@ namespace NzbDrone.Web.Controllers
|
|
|
|
|
profile.Allowed = new List<QualityTypes>();
|
|
|
|
|
foreach (var quality in profile.AllowedString.Split(','))
|
|
|
|
|
{
|
|
|
|
|
var qType = (QualityTypes)Enum.Parse(typeof(QualityTypes), quality);
|
|
|
|
|
var qType = (QualityTypes) Enum.Parse(typeof (QualityTypes), quality);
|
|
|
|
|
profile.Allowed.Add(qType);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -336,6 +337,7 @@ namespace NzbDrone.Web.Controllers
|
|
|
|
|
_qualityProvider.Add(profile);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
catch (Exception e)
|
|
|
|
|
{
|
|
|
|
|