Add StartIndex result to /Items API query

pull/2118/head
chaosinnovator 5 years ago
parent 6f283d80dc
commit b98e25a07e

@ -127,6 +127,7 @@ namespace MediaBrowser.Api.UserLibrary
var result = new QueryResult<BaseItemDto>
{
StartIndex = request.StartIndex.GetValueOrDefault(),
TotalRecordCount = itemsResult.TotalRecordCount,
Items = returnItems
};
@ -177,6 +178,7 @@ namespace MediaBrowser.Api.UserLibrary
return new QueryResult<BaseItemDto>
{
StartIndex = request.StartIndex.GetValueOrDefault(),
TotalRecordCount = result.TotalRecordCount,
Items = dtoList
};
@ -237,7 +239,8 @@ namespace MediaBrowser.Api.UserLibrary
return new QueryResult<BaseItem>
{
Items = Array.Empty<BaseItem>(),
TotalRecordCount = 0
TotalRecordCount = 0,
StartIndex = 0
};
}
@ -250,7 +253,8 @@ namespace MediaBrowser.Api.UserLibrary
return new QueryResult<BaseItem>
{
Items = itemsArray,
TotalRecordCount = itemsArray.Length
TotalRecordCount = itemsArray.Length,
StartIndex = 0
};
}

@ -17,6 +17,12 @@ namespace MediaBrowser.Model.Querying
/// <value>The total record count.</value>
public int TotalRecordCount { get; set; }
/// <summary>
/// The index of the first record in Items.
/// </summary>
/// <value>First record index.</value>
public int StartIndex { get; set; }
public QueryResult()
{
Items = Array.Empty<T>();

Loading…
Cancel
Save