1
0
Fork 0
mirror of https://github.com/lidarr/Lidarr synced 2024-12-26 09:37:12 +00:00

Added images for provider, shown on the History grid.

This commit is contained in:
Mark McDowall 2011-04-27 21:27:02 -07:00
parent 7e946277bb
commit b146b62ef3
10 changed files with 12 additions and 6 deletions

View file

@ -7,7 +7,7 @@ namespace NzbDrone.Core.Model
{
public enum IndexerType
{
Other = 0,
Unknown = 0,
NzbsOrg = 1,
NzbMatrix = 2,
NzbsRus = 3,

View file

@ -251,7 +251,7 @@ protected virtual EpisodeParseResult CustomParser(SyndicationItem item, EpisodeP
/// <returns>IndexerType Enum</returns>
protected virtual IndexerType GetIndexerType()
{
return IndexerType.Other;
return IndexerType.Unknown;
}
private bool InHistory(IList<Episode> episodes, EpisodeParseResult parseResult, SyndicationItem feedItem)

Binary file not shown.

After

Width:  |  Height:  |  Size: 902 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 719 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 198 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 264 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 816 B

View file

@ -1,5 +1,6 @@
using System.Linq;
using System.Web.Mvc;
using NzbDrone.Core.Model;
using NzbDrone.Core.Providers;
using NzbDrone.Web.Models;
using Telerik.Web.Mvc;
@ -53,11 +54,10 @@ public ActionResult _AjaxBinding()
NzbTitle = h.NzbTitle,
Quality = h.Quality.ToString(),
IsProper = h.IsProper,
Date = h.Date
Date = h.Date,
Indexer = h.Indexer.ToString()
});
history.ToList();
return View(new GridModel(history));
}
}

View file

@ -1,4 +1,5 @@
using System;
using NzbDrone.Core.Model;
namespace NzbDrone.Web.Models
{
@ -14,5 +15,6 @@ public class HistoryModel
public string Quality { get; set; }
public DateTime Date { get; set; }
public bool IsProper { get; set; }
public string Indexer { get; set; }
}
}

View file

@ -15,11 +15,15 @@ History
.TableHtmlAttributes(new { @class = "Grid" })
.Columns(columns =>
{
columns.Bound(c => c.Indexer)
.ClientTemplate("<center><img alt='<#= Indexer #>' src='" + Url.Content("~/Content/Images/") + "<#= Indexer #>.png' /></center>")
.Title("")
.Width(20);
columns.Bound(c => c.SeriesTitle).Title("Series Name");
columns.Bound(c => c.SeasonNumber).Title("Season").Width(1);
columns.Bound(c => c.EpisodeNumber).Title("Episode").Width(1);
columns.Bound(c => c.EpisodeTitle).Title("Episode Title");
columns.Bound(c => c.Quality).Title("Quality").Width(10);
columns.Bound(c => c.Quality).Title("Quality").Width(50);
columns.Bound(c => c.Date).Title("Grabbed on");
})
.DetailView(detailView => detailView.ClientTemplate(