mirror of
https://github.com/lidarr/Lidarr
synced 2025-03-03 18:15:37 +00:00
Fixed add new profile.
Removed DownloadPropers bool.
This commit is contained in:
parent
2788368f73
commit
cd85964edd
3 changed files with 2 additions and 23 deletions
|
@ -134,17 +134,13 @@ public ActionResult Quality()
|
||||||
ViewData["Qualities"] = qualityTypes;
|
ViewData["Qualities"] = qualityTypes;
|
||||||
|
|
||||||
var profiles = _qualityProvider.GetAllProfiles().ToList();
|
var profiles = _qualityProvider.GetAllProfiles().ToList();
|
||||||
|
|
||||||
var defaultQualityQualityProfileId = Convert.ToInt32(_configProvider.DefaultQualityProfile);
|
var defaultQualityQualityProfileId = Convert.ToInt32(_configProvider.DefaultQualityProfile);
|
||||||
var downloadPropers = _configProvider.DownloadPropers;
|
|
||||||
|
|
||||||
var qualityProfileSelectList = new SelectList(profiles, "QualityProfileId", "Name");
|
var qualityProfileSelectList = new SelectList(profiles, "QualityProfileId", "Name");
|
||||||
|
|
||||||
var model = new QualityModel
|
var model = new QualityModel
|
||||||
{
|
{
|
||||||
Profiles = profiles,
|
Profiles = profiles,
|
||||||
DefaultQualityProfileId = defaultQualityQualityProfileId,
|
DefaultQualityProfileId = defaultQualityQualityProfileId,
|
||||||
DownloadPropers = downloadPropers,
|
|
||||||
QualityProfileSelectList = qualityProfileSelectList
|
QualityProfileSelectList = qualityProfileSelectList
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -208,7 +204,7 @@ public ViewResult AddProfile()
|
||||||
qualityTypes.Add(qual);
|
qualityTypes.Add(qual);
|
||||||
}
|
}
|
||||||
|
|
||||||
ViewData["Qualities"] = new SelectList(qualityTypes);
|
ViewData["Qualities"] = qualityTypes;
|
||||||
|
|
||||||
var qualityProfile = new QualityProfile
|
var qualityProfile = new QualityProfile
|
||||||
{
|
{
|
||||||
|
@ -219,7 +215,6 @@ public ViewResult AddProfile()
|
||||||
|
|
||||||
var id = _qualityProvider.Add(qualityProfile);
|
var id = _qualityProvider.Add(qualityProfile);
|
||||||
qualityProfile.QualityProfileId = id;
|
qualityProfile.QualityProfileId = id;
|
||||||
qualityProfile.Allowed = null;
|
|
||||||
|
|
||||||
ViewData["ProfileId"] = id;
|
ViewData["ProfileId"] = id;
|
||||||
|
|
||||||
|
@ -460,7 +455,6 @@ public ActionResult SaveQuality(QualityModel data)
|
||||||
if (ModelState.IsValid)
|
if (ModelState.IsValid)
|
||||||
{
|
{
|
||||||
_configProvider.DefaultQualityProfile = data.DefaultQualityProfileId;
|
_configProvider.DefaultQualityProfile = data.DefaultQualityProfileId;
|
||||||
_configProvider.DownloadPropers = data.DownloadPropers;
|
|
||||||
|
|
||||||
//Saves only the Default Quality, skips User Profiles since none exist
|
//Saves only the Default Quality, skips User Profiles since none exist
|
||||||
if (data.Profiles == null)
|
if (data.Profiles == null)
|
||||||
|
|
|
@ -13,10 +13,6 @@ public class QualityModel
|
||||||
[Description("The default quality to use when adding series to NzbDrone")]
|
[Description("The default quality to use when adding series to NzbDrone")]
|
||||||
public int DefaultQualityProfileId { get; set; }
|
public int DefaultQualityProfileId { get; set; }
|
||||||
|
|
||||||
[DisplayName("Download Propers")]
|
|
||||||
[Description("Should NzbDrone download proper releases (to replace non-proper files)?")]
|
|
||||||
public bool DownloadPropers { get; set; }
|
|
||||||
|
|
||||||
public SelectList QualityProfileSelectList { get; set; }
|
public SelectList QualityProfileSelectList { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -48,17 +48,6 @@
|
||||||
<legend>Quality</legend>
|
<legend>Quality</legend>
|
||||||
|
|
||||||
<div class="rightSide" style="float: right; width: 65%;">
|
<div class="rightSide" style="float: right; width: 65%;">
|
||||||
<div class="config-section">
|
|
||||||
<div class="config-group">
|
|
||||||
<div class="config-title">@Html.LabelFor(m => m.DownloadPropers)</div>
|
|
||||||
<div class="config-value">@Html.CheckBoxFor(m => m.DownloadPropers)</div>
|
|
||||||
</div>
|
|
||||||
<div class="config-group2">
|
|
||||||
<div class="config-validation">@Html.ValidationMessageFor(m => m.DownloadPropers)</div>
|
|
||||||
<div class="config-description">@Html.DescriptionFor(m => m.DownloadPropers)</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="config-section">
|
<div class="config-section">
|
||||||
<div class="config-group">
|
<div class="config-group">
|
||||||
<div class="config-title">@Html.LabelFor(m => m.DefaultQualityProfileId)</div>
|
<div class="config-title">@Html.LabelFor(m => m.DefaultQualityProfileId)</div>
|
||||||
|
@ -103,7 +92,7 @@
|
||||||
url: this.href,
|
url: this.href,
|
||||||
cache: false,
|
cache: false,
|
||||||
success: function (html) {
|
success: function (html) {
|
||||||
$("#profiles").prepend(html);
|
$("#profiles").append(html);
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue