mirror of
https://github.com/lidarr/Lidarr
synced 2025-03-03 18:15:37 +00:00
Bug: Fixed qualityProfile so it returns the selected cutoff in the model.
Now using trim before checking title.length for AddExistingSeries.
This commit is contained in:
parent
0e246b2cd9
commit
4796b81cf1
3 changed files with 5 additions and 1 deletions
|
@ -118,6 +118,9 @@ public JsonResult AddNewSeries(string path, string seriesName, int seriesId, int
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public JsonResult AddExistingSeries(string path, string seriesName, int seriesId, int qualityProfileId)
|
public JsonResult AddExistingSeries(string path, string seriesName, int seriesId, int qualityProfileId)
|
||||||
{
|
{
|
||||||
|
if (seriesId == 0 || String.IsNullOrWhiteSpace(seriesName))
|
||||||
|
return Json(new NotificationResult() { Title = "Failed", Text = "Invalid Series Information, Series not added.", NotificationType = NotificationType.Error });
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_seriesProvider.AddSeries(path, seriesId, qualityProfileId);
|
_seriesProvider.AddSeries(path, seriesId, qualityProfileId);
|
||||||
|
|
|
@ -247,6 +247,7 @@ public PartialViewResult GetQualityProfileView(QualityProfile profile)
|
||||||
model.Webdl = profile.Allowed.Contains(QualityTypes.WEBDL);
|
model.Webdl = profile.Allowed.Contains(QualityTypes.WEBDL);
|
||||||
model.Bluray720p = profile.Allowed.Contains(QualityTypes.Bluray720p);
|
model.Bluray720p = profile.Allowed.Contains(QualityTypes.Bluray720p);
|
||||||
model.Bluray1080p = profile.Allowed.Contains(QualityTypes.Bluray1080p);
|
model.Bluray1080p = profile.Allowed.Contains(QualityTypes.Bluray1080p);
|
||||||
|
model.Cutoff = profile.Cutoff;
|
||||||
|
|
||||||
return PartialView("QualityProfileItem", model);
|
return PartialView("QualityProfileItem", model);
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,7 @@ $(".addExistingButton").live('click', function () {
|
||||||
|
|
||||||
var path = root.find(".seriesPathValue Label").text();
|
var path = root.find(".seriesPathValue Label").text();
|
||||||
|
|
||||||
if (seriesId === 0 || title.length === 0) {
|
if (seriesId === 0 || $.trim(title).length === 0) {
|
||||||
$.gritter.add({
|
$.gritter.add({
|
||||||
title: 'Failed',
|
title: 'Failed',
|
||||||
text: 'Invalid Series Information for \'' + path + '\'',
|
text: 'Invalid Series Information for \'' + path + '\'',
|
||||||
|
|
Loading…
Reference in a new issue