Episode activity goes through History now

Do not report exceptions on linux (culture is null and fails)
This commit is contained in:
Mark McDowall
2013-10-06 11:06:39 -07:00
parent 7d2c6339bc
commit 27511769ae
12 changed files with 48 additions and 109 deletions

View File

@@ -1,4 +1,7 @@
using NzbDrone.Core.Datastore;
using System;
using System.Collections.Generic;
using NzbDrone.Api.Mapping;
using NzbDrone.Core.Datastore;
using NzbDrone.Core.History;
namespace NzbDrone.Api.History
@@ -15,6 +18,8 @@ namespace NzbDrone.Api.History
private PagingResource<HistoryResource> GetHistory(PagingResource<HistoryResource> pagingResource)
{
var episodeId = Request.Query.EpisodeId;
var pagingSpec = new PagingSpec<Core.History.History>
{
Page = pagingResource.Page,
@@ -23,6 +28,12 @@ namespace NzbDrone.Api.History
SortDirection = pagingResource.SortDirection
};
if (episodeId.HasValue)
{
int i = (int)episodeId;
pagingSpec.FilterExpression = h => h.EpisodeId == i;
}
return ApplyToPage(_historyService.Paged, pagingSpec);
}
}