diff --git a/NzbDrone.Core/Providers/Indexer/IndexerProviderBase.cs b/NzbDrone.Core/Providers/Indexer/IndexerProviderBase.cs index ff591d4da..063c5560a 100644 --- a/NzbDrone.Core/Providers/Indexer/IndexerProviderBase.cs +++ b/NzbDrone.Core/Providers/Indexer/IndexerProviderBase.cs @@ -127,21 +127,21 @@ internal void ProcessItem(SyndicationItem feedItem) if (_historyProvider.Exists(episode.EpisodeId, parseResult.Quality, parseResult.Proper)) { _logger.Debug("Episode in history: {0}", episode.ToString()); - continue; } + else + { + //TODO: Add episode to sab - //TODO: Add episode to sab - - _historyProvider.Add(new History - { - Date = DateTime.Now, - EpisodeId = episode.EpisodeId, - IsProper = parseResult.Proper, - NzbTitle = feedItem.Title.Text, - Quality = parseResult.Quality - }); + _historyProvider.Add(new History + { + Date = DateTime.Now, + EpisodeId = episode.EpisodeId, + IsProper = parseResult.Proper, + NzbTitle = feedItem.Title.Text, + Quality = parseResult.Quality + }); + } } - } } diff --git a/NzbDrone.Core/Repository/Episode.cs b/NzbDrone.Core/Repository/Episode.cs index 39e4e0daa..008fd795e 100644 --- a/NzbDrone.Core/Repository/Episode.cs +++ b/NzbDrone.Core/Repository/Episode.cs @@ -38,6 +38,11 @@ public class Episode public virtual EpisodeFile EpisodeFile { get; set; } [SubSonicToManyRelation] - public virtual List Histories { get; private set; } + public virtual List Histories { get; protected set; } + + public override string ToString() + { + return String.Format("[Episode: '{0} S{1:00}E{2:00}']", Series.Title, SeasonNumber, EpisodeNumber); + } } } \ No newline at end of file diff --git a/NzbDrone.Web/Views/History/Index.cshtml b/NzbDrone.Web/Views/History/Index.cshtml index 51747ccaf..89727a00e 100644 --- a/NzbDrone.Web/Views/History/Index.cshtml +++ b/NzbDrone.Web/Views/History/Index.cshtml @@ -1,6 +1,5 @@ @model List @using NzbDrone.Web.Models - @section Scripts{ } - @section TitleContent{ - History +History } - @section ActionMenu{ @{Html.Telerik().Menu().Name("historyMenu").Items(items => { @@ -33,17 +30,17 @@ items.Add().Text("Purge History").Action("Purge", "History"); }).Render();} } - @section MainContent{ @{Html.Telerik().Grid().Name("history") + .TableHtmlAttributes(new { @class = "Grid" }) .Columns(columns => { columns.Bound(c => c.SeriesTitle).Title("Series Name").Width(120); - columns.Bound(c => c.SeasonNumber).Title("Season #").Width(10); - columns.Bound(c => c.EpisodeNumber).Title("Episode #").Width(10); - columns.Bound(c => c.EpisodeTitle).Title("Episode Title").Width(140); - columns.Bound(c => c.Quality).Title("Quality").Width(30); - columns.Bound(c => c.Date).Title("Date Grabbed").Width(60); + columns.Bound(c => c.SeasonNumber).Title("Season").Width(10); + columns.Bound(c => c.EpisodeNumber).Title("Episode").Width(10); + columns.Bound(c => c.EpisodeTitle).Title("Episode Title"); + columns.Bound(c => c.Quality).Title("Quality").Width(10); + columns.Bound(c => c.Date).Title("Date/Time Grabbed"); }) .DetailView(detailView => detailView.ClientTemplate( "
" + @@ -57,7 +54,7 @@ .Pageable( c => c.PageSize(50).Position(GridPagerPosition.Bottom).Style(GridPagerStyles.NextPrevious)) - //.Filterable() - //.ClientEvents(c => c.OnRowDataBound("onRowDataBound")) + //.Filterable() + //.ClientEvents(c => c.OnRowDataBound("onRowDataBound")) .Render();} -} \ No newline at end of file +}