diff --git a/NzbDrone.Web/Controllers/SeriesController.cs b/NzbDrone.Web/Controllers/SeriesController.cs index c617283c1..59897545d 100644 --- a/NzbDrone.Web/Controllers/SeriesController.cs +++ b/NzbDrone.Web/Controllers/SeriesController.cs @@ -228,29 +228,6 @@ namespace NzbDrone.Web.Controllers return View(series); } - public ActionResult Edit(int seriesId) - { - var profiles = _qualityProvider.GetAllProfiles(); - ViewData["SelectList"] = new SelectList(profiles, "QualityProfileId", "Name"); - - var series = _seriesProvider.GetSeries(seriesId); - return View(series); - } - - [HttpPost] - public ActionResult Edit(Series series) - { - //Need to add seriesProvider.Update - _seriesProvider.UpdateSeries(series); - return Content("Series Updated Successfully"); - } - - public ActionResult Delete(int seriesId) - { - _jobProvider.BeginExecute(typeof(DeleteSeriesJob), seriesId); - return RedirectToAction("Index", "Series"); - } - public ActionResult SyncEpisodesOnDisk(int seriesId) { //Syncs the episodes on disk for the specified series @@ -317,7 +294,7 @@ namespace NzbDrone.Web.Controllers Path = s.Path, QualityProfileId = s.QualityProfileId, QualityProfileName = s.QualityProfile.Name, - SeasonsCount = s.Seasons.Count, + SeasonsCount = s.Seasons.Where(x => x.SeasonNumber > 0).Count(), SeasonFolder = s.SeasonFolder, Status = s.Status })); diff --git a/NzbDrone.Web/NzbDrone.Web.csproj b/NzbDrone.Web/NzbDrone.Web.csproj index 06adcc1e3..9a8ec4cc3 100644 --- a/NzbDrone.Web/NzbDrone.Web.csproj +++ b/NzbDrone.Web/NzbDrone.Web.csproj @@ -687,7 +687,6 @@ - diff --git a/NzbDrone.Web/Views/Series/Details.cshtml b/NzbDrone.Web/Views/Series/Details.cshtml index dbfcb1834..88722f824 100644 --- a/NzbDrone.Web/Views/Series/Details.cshtml +++ b/NzbDrone.Web/Views/Series/Details.cshtml @@ -7,12 +7,6 @@ @section ActionMenu{ @{Html.Telerik().Menu().Name("SeriesMenu").Items(items => { - items.Add().Text("Edit").Action("Edit", "Series", - new - { - seriesId = - Model.SeriesId - }); items.Add().Text("Back to Series List").Action("Index", "Series"); items.Add().Text("Scan For Episodes on Disk").Action( diff --git a/NzbDrone.Web/Views/Series/Edit.cshtml b/NzbDrone.Web/Views/Series/Edit.cshtml deleted file mode 100644 index d7bc3d4c6..000000000 --- a/NzbDrone.Web/Views/Series/Edit.cshtml +++ /dev/null @@ -1,98 +0,0 @@ -@model NzbDrone.Core.Repository.Series - -@section TitleContent{ - Edit -} - -@section Scripts{ - -} - -@section MainContent{ -

@Html.DisplayTextFor(model => model.Title)

- - @using (Html.BeginForm("Edit", "Series", FormMethod.Post, new { id = "form", name = "form" })) - { - -
- Edit - -
- @Html.LabelFor(model => model.Path) -
-
- @Html.TextBoxFor(model => model.Path, new { style = "width: 250" }) - @Html.ValidationMessageFor(model => model.Path) -
- -
- @Html.LabelFor(model => model.Monitored) -
-
- @Html.CheckBoxFor(model => model.Monitored) - @Html.ValidationMessageFor(model => model.Monitored) -
- -
- @Html.LabelFor(model => model.SeasonFolder) -
-
- @Html.CheckBoxFor(model => model.SeasonFolder) - @Html.ValidationMessageFor(model => model.SeasonFolder) -
- -
- @Html.LabelFor(model => model.QualityProfileId) -
-
- @Html.DropDownListFor(model => model.QualityProfileId, (SelectList) ViewData["SelectList"]) - @Html.ValidationMessageFor(model => model.QualityProfileId) -
- - - -

- -

-
- } - -
- @Html.ActionLink("Back to Show", "Details", new {seriesId = Model.SeriesId}) | - @Html.ActionLink("Back to List", "Index") - @Html.ActionLink("Delete Series", "Delete", new {seriesId = Model.SeriesId}) -
- -
-} \ No newline at end of file diff --git a/NzbDrone.Web/Views/Series/Index.cshtml b/NzbDrone.Web/Views/Series/Index.cshtml index 9953c8191..2a00f941a 100644 --- a/NzbDrone.Web/Views/Series/Index.cshtml +++ b/NzbDrone.Web/Views/Series/Index.cshtml @@ -13,10 +13,7 @@ @section MainContent{ @{Html.Telerik().Grid().Name("Grid") .TableHtmlAttributes(new { @class = "Grid" }) - .DataKeys(keys => - { - keys.Add(p => p.SeriesId); - }) + .DataKeys(keys => keys.Add(p => p.SeriesId)) .DataBinding(data => data.Ajax() .Select("_AjaxSeriesGrid", "Series") .Update("_SaveAjaxSeriesEditing", "Series")