mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-14 17:13:49 -07:00
Added Missing view to show which episodes are missing from disk for all series.
This commit is contained in:
parent
0e429f58a1
commit
86019a2597
4 changed files with 97 additions and 0 deletions
46
NzbDrone.Web/Controllers/MissingController.cs
Normal file
46
NzbDrone.Web/Controllers/MissingController.cs
Normal file
|
@ -0,0 +1,46 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.Mvc;
|
||||
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()
|
||||
{
|
||||
//TODO: possible subsonic bug, IQuarible causes some issues so ToList() is called
|
||||
//https://github.com/subsonic/SubSonic-3.0/issues/263
|
||||
|
||||
var missing = _episodeProvider.EpisodesWithoutFiles(false).Select(e => new MissingEpisodeModel
|
||||
{
|
||||
EpisodeId = e.EpisodeId,
|
||||
SeasonNumber = e.SeasonNumber,
|
||||
EpisodeNumber = e.EpisodeNumber,
|
||||
EpisodeTitle = e.Title,
|
||||
Overview = e.Overview,
|
||||
SeriesTitle = e.Series.Title,
|
||||
AirDate = e.AirDate,
|
||||
});
|
||||
|
||||
return View(new GridModel(missing));
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue