aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Controllers/SuggestionsController.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Jellyfin.Api/Controllers/SuggestionsController.cs')
-rw-r--r--Jellyfin.Api/Controllers/SuggestionsController.cs13
1 files changed, 7 insertions, 6 deletions
diff --git a/Jellyfin.Api/Controllers/SuggestionsController.cs b/Jellyfin.Api/Controllers/SuggestionsController.cs
index af77c801f..e9c46dcf3 100644
--- a/Jellyfin.Api/Controllers/SuggestionsController.cs
+++ b/Jellyfin.Api/Controllers/SuggestionsController.cs
@@ -63,7 +63,9 @@ namespace Jellyfin.Api.Controllers
[FromQuery] int? limit,
[FromQuery] bool enableTotalRecordCount = false)
{
- var user = !userId.Equals(Guid.Empty) ? _userManager.GetUserById(userId) : null;
+ var user = userId.Equals(default)
+ ? null
+ : _userManager.GetUserById(userId);
var dtoOptions = new DtoOptions().AddClientFields(Request);
var result = _libraryManager.GetItemsResult(new InternalItemsQuery(user)
@@ -81,11 +83,10 @@ namespace Jellyfin.Api.Controllers
var dtoList = _dtoService.GetBaseItemDtos(result.Items, dtoOptions, user);
- return new QueryResult<BaseItemDto>
- {
- TotalRecordCount = result.TotalRecordCount,
- Items = dtoList
- };
+ return new QueryResult<BaseItemDto>(
+ startIndex,
+ result.TotalRecordCount,
+ dtoList);
}
}
}