mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-19 13:10:13 -07:00
Episode activity goes through History now
Do not report exceptions on linux (culture is null and fails)
This commit is contained in:
parent
7d2c6339bc
commit
27511769ae
12 changed files with 48 additions and 109 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue