mirror of
https://github.com/Radarr/Radarr.git
synced 2024-11-10 04:52:42 +01:00
Merge remote-tracking branch 'origin/master' into release-group
This commit is contained in:
commit
0d40e2d43e
@ -123,14 +123,20 @@ public virtual void CreateForEpisodeFile(EpisodeFile episodeFile, TvdbSeries tvD
|
||||
public virtual void CreateForEpisodeFiles(List<EpisodeFile> episodeFiles)
|
||||
{
|
||||
if (episodeFiles == null || !episodeFiles.Any())
|
||||
return;
|
||||
|
||||
{
|
||||
Logger.Warn("No episode files, no metadata will be created.");
|
||||
throw new ArgumentException("EpsiodeFiles must not be null or empty", "episodeFiles");
|
||||
}
|
||||
|
||||
Logger.Trace("Creating metadata for {0} files.", episodeFiles.Count);
|
||||
|
||||
var tvDbSeries = _tvDbProvider.GetSeries(episodeFiles.First().SeriesId, true, true);
|
||||
|
||||
foreach(var episodeFile in episodeFiles)
|
||||
{
|
||||
foreach (var provider in _metadataProviders.Where(i => GetSettings(i.GetType()).Enable))
|
||||
{
|
||||
Logger.Trace("Creating {0} metadata for {1}", provider.Name, episodeFile.EpisodeFileId);
|
||||
provider.CreateForEpisodeFile(episodeFile, tvDbSeries);
|
||||
}
|
||||
}
|
||||
|
@ -27,34 +27,6 @@ public ActionResult Index()
|
||||
return View();
|
||||
}
|
||||
|
||||
//public JsonResult AjaxBinding()
|
||||
//{
|
||||
// var history = _historyProvider.AllItemsWithRelationships().Select(h => new HistoryModel
|
||||
// {
|
||||
// HistoryId = h.HistoryId,
|
||||
// SeriesId = h.SeriesId,
|
||||
// EpisodeNumbering = string.Format("{0}x{1:00}", h.Episode.SeasonNumber, h.Episode.EpisodeNumber),
|
||||
// EpisodeTitle = h.Episode.Title,
|
||||
// EpisodeOverview = h.Episode.Overview,
|
||||
// SeriesTitle = h.SeriesTitle,
|
||||
// SeriesTitleSorter = SortHelper.SkipArticles(h.SeriesTitle),
|
||||
// NzbTitle = h.NzbTitle,
|
||||
// Quality = h.Quality.ToString(),
|
||||
// IsProper = h.IsProper,
|
||||
// Date = h.Date.ToString(),
|
||||
// DateSorter = h.Date.ToString("MM/dd/yyyy h:mm:ss tt"),
|
||||
// Indexer = h.Indexer,
|
||||
// EpisodeId = h.EpisodeId,
|
||||
// NzbInfoUrl = h.NzbInfoUrl
|
||||
// }).OrderByDescending(h => h.Date).ToList();
|
||||
|
||||
// return Json(new
|
||||
// {
|
||||
// aaData = history
|
||||
// },
|
||||
// JsonRequestBehavior.AllowGet);
|
||||
//}
|
||||
|
||||
public ActionResult AjaxBinding(DataTablesPageRequest pageRequest)
|
||||
{
|
||||
var pageResult = _historyProvider.GetPagedItems(pageRequest);
|
||||
|
@ -2,8 +2,8 @@
|
||||
@{ViewBag.Title = "History";}
|
||||
@section ActionMenu{
|
||||
<ul class="sub-menu">
|
||||
<li>@Ajax.ActionLink("Trim History", "Trim", "History", null, new AjaxOptions{ OnSuccess = "reloadGrid", Confirm = "Delete history items older than 30 days?"}, new { Title = "Delete history items older than 30 days" })</li>
|
||||
<li>@Ajax.ActionLink("Purge History", "Purge", "History", null, new AjaxOptions{ OnSuccess = "reloadGrid", Confirm = "Purge all history items?" }, new { Title = "Delete all history items" })</li>
|
||||
<li>@Ajax.ActionLink("Trim History", "Trim", "History", null, new AjaxOptions{ OnSuccess = "redrawGrid", Confirm = "Delete history items older than 30 days?"}, new { Title = "Delete history items older than 30 days" })</li>
|
||||
<li>@Ajax.ActionLink("Purge History", "Purge", "History", null, new AjaxOptions{ OnSuccess = "redrawGrid", Confirm = "Purge all history items?" }, new { Title = "Delete all history items" })</li>
|
||||
<li>@Html.ActionLink("Search History", "Index", "SearchHistory", null, new { Title = "Review recent searches" })</li>
|
||||
</ul>
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user