aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Controllers/YearsController.cs
diff options
context:
space:
mode:
authorMark Cilia Vincenti <markciliavincenti@gmail.com>2024-01-27 21:31:12 +0100
committerGitHub <noreply@github.com>2024-01-27 21:31:12 +0100
commit3fa86a45595c604a0211ba9ffbc4c7f78f9de881 (patch)
tree006a774c8d2464b53f3f6efc26c9549e4ab7d5ce /Jellyfin.Api/Controllers/YearsController.cs
parent179965e7749794513be0b832e9d8fb31444e9779 (diff)
parent054f42332d8e0c45fb899eeaef982aa0fd549397 (diff)
Merge branch 'jellyfin:master' into AsyncKeyedLock-migration
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);