mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-12-12 11:15:43 +02:00
71e1827ef8
Fixed padding for No Data being cut off (also when loading) for the grids.
49 lines
1.3 KiB
C#
49 lines
1.3 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Web;
|
|
using System.Web.Mvc;
|
|
using NzbDrone.Core;
|
|
using NzbDrone.Core.Providers;
|
|
using NzbDrone.Web.Models;
|
|
using Telerik.Web.Mvc;
|
|
|
|
namespace NzbDrone.Web.Controllers
|
|
{
|
|
public class MissingController : Controller
|
|
{
|
|
private readonly EpisodeProvider _episodeProvider;
|
|
|
|
public MissingController(EpisodeProvider episodeProvider)
|
|
{
|
|
_episodeProvider = episodeProvider;
|
|
}
|
|
|
|
public ActionResult Index()
|
|
{
|
|
return View();
|
|
}
|
|
|
|
[GridAction]
|
|
public ActionResult _AjaxBinding()
|
|
{
|
|
var missingEpisodes = _episodeProvider.EpisodesWithoutFiles(false);
|
|
|
|
var missing = missingEpisodes.Select(e => new MissingEpisodeModel
|
|
{
|
|
EpisodeId = e.EpisodeId,
|
|
SeriesId = e.SeriesId,
|
|
SeasonNumber = e.SeasonNumber,
|
|
EpisodeNumber = e.EpisodeNumber,
|
|
EpisodeTitle = e.Title,
|
|
Overview = e.Overview,
|
|
SeriesTitle = e.Series.Title,
|
|
AirDate = e.AirDate.Value,
|
|
AirDateString = e.AirDate.Value.ToBestDateString()
|
|
});
|
|
|
|
return View(new GridModel(missing));
|
|
}
|
|
}
|
|
}
|