|
|
|
@ -70,6 +70,7 @@ namespace Lidarr.Api.V1.History
|
|
|
|
|
|
|
|
|
|
var eventTypeFilter = pagingResource.Filters.FirstOrDefault(f => f.Key == "eventType");
|
|
|
|
|
var albumIdFilter = pagingResource.Filters.FirstOrDefault(f => f.Key == "albumId");
|
|
|
|
|
var downloadIdFilter = pagingResource.Filters.FirstOrDefault(f => f.Key == "downloadId");
|
|
|
|
|
|
|
|
|
|
if (eventTypeFilter != null)
|
|
|
|
|
{
|
|
|
|
@ -83,6 +84,12 @@ namespace Lidarr.Api.V1.History
|
|
|
|
|
pagingSpec.FilterExpressions.Add(h => h.AlbumId == albumId);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (downloadIdFilter != null)
|
|
|
|
|
{
|
|
|
|
|
var downloadId = downloadIdFilter.Value;
|
|
|
|
|
pagingSpec.FilterExpressions.Add(h => h.DownloadId == downloadId);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return ApplyToPage(_historyService.Paged, pagingSpec, h => MapToResource(h, includeArtist, includeAlbum, includeTrack));
|
|
|
|
|
}
|
|
|
|
|