mirror of
https://github.com/Radarr/Radarr
synced 2025-01-30 19:31:35 +00:00
Fixed series grid after save so it has proper counts.
This commit is contained in:
parent
56fdf1a040
commit
3a065b86f1
2 changed files with 5 additions and 5 deletions
|
@ -42,11 +42,11 @@ public virtual IList<Series> GetAllSeries()
|
|||
return series;
|
||||
}
|
||||
|
||||
public virtual IList<Series> GetAllSeriesWithEpisodeCount(bool ignoreSpecials)
|
||||
public virtual IList<Series> GetAllSeriesWithEpisodeCount(bool ignoreSpecialsInSeasonCount)
|
||||
{
|
||||
var seasonNumber = 0;
|
||||
|
||||
if (!ignoreSpecials)
|
||||
if (!ignoreSpecialsInSeasonCount)
|
||||
seasonNumber = -1;
|
||||
|
||||
var series = _database.Fetch<Series, QualityProfile>(@"SELECT Series.*, COUNT (NULLIF(Ignored, 1)) AS EpisodeCount,
|
||||
|
|
|
@ -80,7 +80,7 @@ public ActionResult GetSingleSeasonView(SeasonEditModel model)
|
|||
[GridAction]
|
||||
public ActionResult _AjaxSeriesGrid()
|
||||
{
|
||||
var series = GetSeriesModels(_seriesProvider.GetAllSeriesWithEpisodeCount(true).ToList());
|
||||
var series = GetSeriesModels(_seriesProvider.GetAllSeriesWithEpisodeCount(true));
|
||||
return View(new GridModel(series));
|
||||
}
|
||||
|
||||
|
@ -96,7 +96,7 @@ public ActionResult _SaveAjaxSeriesEditing(int id, string path, bool monitored,
|
|||
|
||||
_seriesProvider.UpdateSeries(oldSeries);
|
||||
|
||||
var series = GetSeriesModels(_seriesProvider.GetAllSeries().ToList());
|
||||
var series = GetSeriesModels(_seriesProvider.GetAllSeriesWithEpisodeCount(true));
|
||||
return View(new GridModel(series));
|
||||
}
|
||||
|
||||
|
@ -192,7 +192,7 @@ public ActionResult UpdateInfo(int seriesId)
|
|||
return RedirectToAction("Details", new { seriesId });
|
||||
}
|
||||
|
||||
private List<SeriesModel> GetSeriesModels(List<Series> seriesInDb)
|
||||
private List<SeriesModel> GetSeriesModels(IList<Series> seriesInDb)
|
||||
{
|
||||
var series = seriesInDb.Select(s => new SeriesModel
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue