diff --git a/MediaBrowser.Api/UserLibrary/ItemsService.cs b/MediaBrowser.Api/UserLibrary/ItemsService.cs index 81142b728..c7b505171 100644 --- a/MediaBrowser.Api/UserLibrary/ItemsService.cs +++ b/MediaBrowser.Api/UserLibrary/ItemsService.cs @@ -119,6 +119,7 @@ namespace MediaBrowser.Api.UserLibrary var result = new QueryResult { + StartIndex = request.StartIndex.GetValueOrDefault(), TotalRecordCount = itemsResult.TotalRecordCount, Items = returnItems }; @@ -169,6 +170,7 @@ namespace MediaBrowser.Api.UserLibrary return new QueryResult { + StartIndex = request.StartIndex.GetValueOrDefault(), TotalRecordCount = result.TotalRecordCount, Items = dtoList }; @@ -229,7 +231,8 @@ namespace MediaBrowser.Api.UserLibrary return new QueryResult { Items = Array.Empty(), - TotalRecordCount = 0 + TotalRecordCount = 0, + StartIndex = 0 }; } @@ -242,7 +245,8 @@ namespace MediaBrowser.Api.UserLibrary return new QueryResult { Items = itemsArray, - TotalRecordCount = itemsArray.Length + TotalRecordCount = itemsArray.Length, + StartIndex = 0 }; } diff --git a/MediaBrowser.Model/Querying/QueryResult.cs b/MediaBrowser.Model/Querying/QueryResult.cs index c007a45d6..221645afb 100644 --- a/MediaBrowser.Model/Querying/QueryResult.cs +++ b/MediaBrowser.Model/Querying/QueryResult.cs @@ -17,6 +17,12 @@ namespace MediaBrowser.Model.Querying /// The total record count. public int TotalRecordCount { get; set; } + /// + /// The index of the first record in Items. + /// + /// First record index. + public int StartIndex { get; set; } + public QueryResult() { Items = Array.Empty();