mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 02:37:08 -07:00
added /logs
This commit is contained in:
parent
fc7d4536ac
commit
9160343a51
16 changed files with 231 additions and 16 deletions
|
@ -195,21 +195,25 @@ namespace NzbDrone.Api.REST
|
|||
Int32.TryParse(Request.Query.Page.ToString(), out page);
|
||||
if (page == 0) page = 1;
|
||||
|
||||
var sortKey = Request.Query.SortKey.ToString();
|
||||
if (String.IsNullOrEmpty(sortKey)) sortKey = "AirDate";
|
||||
|
||||
var sortDirection = Request.Query.SortDir.ToString()
|
||||
.Equals("Asc", StringComparison.InvariantCultureIgnoreCase)
|
||||
? SortDirection.Ascending
|
||||
: SortDirection.Descending;
|
||||
|
||||
var pagingResource = new PagingResource<TResource>
|
||||
{
|
||||
PageSize = pageSize,
|
||||
Page = page,
|
||||
SortKey = sortKey,
|
||||
SortDirection = sortDirection
|
||||
};
|
||||
{
|
||||
PageSize = pageSize,
|
||||
Page = page,
|
||||
};
|
||||
|
||||
if (Request.Query.SortKey != null)
|
||||
{
|
||||
pagingResource.SortKey = Request.Query.SortKey.ToString();
|
||||
|
||||
if (Request.Query.SortDir != null)
|
||||
{
|
||||
pagingResource.SortDirection = Request.Query.SortDir.ToString()
|
||||
.Equals("Asc", StringComparison.InvariantCultureIgnoreCase)
|
||||
? SortDirection.Ascending
|
||||
: SortDirection.Descending;
|
||||
}
|
||||
}
|
||||
|
||||
return pagingResource;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue