aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Controllers/YearsController.cs
diff options
context:
space:
mode:
authorMark Cilia Vincenti <markciliavincenti@gmail.com>2024-02-03 08:45:14 +0100
committerMark Cilia Vincenti <markciliavincenti@gmail.com>2024-02-03 08:45:14 +0100
commitf26fc7dfb263765837dab7a0e4f661ff6bcd6597 (patch)
tree54013c35dd2a1e8e5756b071681f37b31722ff52 /Jellyfin.Api/Controllers/YearsController.cs
parente47144e7c777751b03caf7cbb64cf93f92725725 (diff)
parente4f715bbee26985ae7666e4c80282ac52e7fce73 (diff)
Merge changes
Diffstat (limited to 'Jellyfin.Api/Controllers/YearsController.cs')
-rw-r--r--Jellyfin.Api/Controllers/YearsController.cs6
1 files changed, 3 insertions, 3 deletions
diff --git a/Jellyfin.Api/Controllers/YearsController.cs b/Jellyfin.Api/Controllers/YearsController.cs
index ca46c38c5..e4aa0ea42 100644
--- a/Jellyfin.Api/Controllers/YearsController.cs
+++ b/Jellyfin.Api/Controllers/YearsController.cs
@@ -90,7 +90,7 @@ public class YearsController : BaseJellyfinApiController
.AddClientFields(User)
.AddAdditionalDtoOptions(enableImages, enableUserData, imageTypeLimit, enableImageTypes);
- User? user = userId.Value.Equals(default)
+ User? user = userId.IsNullOrEmpty()
? null
: _userManager.GetUserById(userId.Value);
BaseItem parentItem = _libraryManager.GetParentItem(parentId, userId);
@@ -110,7 +110,7 @@ public class YearsController : BaseJellyfinApiController
{
var folder = (Folder)parentItem;
- if (userId.Equals(default))
+ if (userId.IsNullOrEmpty())
{
items = recursive ? folder.GetRecursiveChildren(Filter) : folder.Children.Where(Filter).ToList();
}
@@ -182,7 +182,7 @@ public class YearsController : BaseJellyfinApiController
var dtoOptions = new DtoOptions()
.AddClientFields(User);
- if (!userId.Value.Equals(default))
+ if (!userId.IsNullOrEmpty())
{
var user = _userManager.GetUserById(userId.Value);
return _dtoService.GetBaseItemDto(item, dtoOptions, user);