aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Controllers/ItemsController.cs
diff options
context:
space:
mode:
authorDavid Ullmer <davidullmer@outlook.de>2021-08-10 14:03:21 +0200
committerDavid Ullmer <davidullmer@outlook.de>2021-08-10 14:03:21 +0200
commit45e0f7893ba8f53827983109557447d2c0c8adcf (patch)
tree05ba6fec826a6bcf4cdb17aa1ccfa6939358052c /Jellyfin.Api/Controllers/ItemsController.cs
parentb5880c26808a6d7f183acb3f7977b42e13ccbf8a (diff)
parent854bb79ae8b1e7004c731939e54e52ef937abe47 (diff)
Merge remote-tracking branch 'upstream/master' into localization-test
Diffstat (limited to 'Jellyfin.Api/Controllers/ItemsController.cs')
-rw-r--r--Jellyfin.Api/Controllers/ItemsController.cs6
1 files changed, 3 insertions, 3 deletions
diff --git a/Jellyfin.Api/Controllers/ItemsController.cs b/Jellyfin.Api/Controllers/ItemsController.cs
index 74cf3b162..35c27dd0e 100644
--- a/Jellyfin.Api/Controllers/ItemsController.cs
+++ b/Jellyfin.Api/Controllers/ItemsController.cs
@@ -143,7 +143,7 @@ namespace Jellyfin.Api.Controllers
[HttpGet("Items")]
[ProducesResponseType(StatusCodes.Status200OK)]
public ActionResult<QueryResult<BaseItemDto>> GetItems(
- [FromQuery] Guid? userId,
+ [FromQuery] Guid userId,
[FromQuery] string? maxOfficialRating,
[FromQuery] bool? hasThemeSong,
[FromQuery] bool? hasThemeVideo,
@@ -224,8 +224,8 @@ namespace Jellyfin.Api.Controllers
[FromQuery] bool enableTotalRecordCount = true,
[FromQuery] bool? enableImages = true)
{
- var user = userId.HasValue && !userId.Equals(Guid.Empty)
- ? _userManager.GetUserById(userId.Value)
+ var user = !userId.Equals(Guid.Empty)
+ ? _userManager.GetUserById(userId)
: null;
var dtoOptions = new DtoOptions { Fields = fields }
.AddClientFields(Request)