diff --git a/NzbDrone.Web/Controllers/AddSeriesController.cs b/NzbDrone.Web/Controllers/AddSeriesController.cs index 220ee88af..9c4d73555 100644 --- a/NzbDrone.Web/Controllers/AddSeriesController.cs +++ b/NzbDrone.Web/Controllers/AddSeriesController.cs @@ -118,6 +118,9 @@ namespace NzbDrone.Web.Controllers [HttpPost] 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 { _seriesProvider.AddSeries(path, seriesId, qualityProfileId); diff --git a/NzbDrone.Web/Controllers/SettingsController.cs b/NzbDrone.Web/Controllers/SettingsController.cs index 8a6c22f34..0904e1ac9 100644 --- a/NzbDrone.Web/Controllers/SettingsController.cs +++ b/NzbDrone.Web/Controllers/SettingsController.cs @@ -247,6 +247,7 @@ namespace NzbDrone.Web.Controllers model.Webdl = profile.Allowed.Contains(QualityTypes.WEBDL); model.Bluray720p = profile.Allowed.Contains(QualityTypes.Bluray720p); model.Bluray1080p = profile.Allowed.Contains(QualityTypes.Bluray1080p); + model.Cutoff = profile.Cutoff; return PartialView("QualityProfileItem", model); } diff --git a/NzbDrone.Web/Scripts/NzbDrone/addSeries.js b/NzbDrone.Web/Scripts/NzbDrone/addSeries.js index 7c93cfb1a..bce9c753a 100644 --- a/NzbDrone.Web/Scripts/NzbDrone/addSeries.js +++ b/NzbDrone.Web/Scripts/NzbDrone/addSeries.js @@ -27,7 +27,7 @@ $(".addExistingButton").live('click', function () { var path = root.find(".seriesPathValue Label").text(); - if (seriesId === 0 || title.length === 0) { + if (seriesId === 0 || $.trim(title).length === 0) { $.gritter.add({ title: 'Failed', text: 'Invalid Series Information for \'' + path + '\'',