aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Controllers/FilterController.cs
diff options
context:
space:
mode:
authorDavid <daullmer@gmail.com>2020-07-22 11:02:44 +0200
committerDavid <daullmer@gmail.com>2020-07-22 11:02:44 +0200
commit90039e1ad32dba8dca3b98901d2dcec1c82aeea2 (patch)
treecafee5bd19816e5242c48acaa7e8c31b8a907278 /Jellyfin.Api/Controllers/FilterController.cs
parenteae665a9c410540bdbf3880e340fa1a7fb19be92 (diff)
parent5b57c81ee14ce585161b9ac331e6e3528826b815 (diff)
Merge remote-tracking branch 'remotes/jellyfin/api-migration' into api-audio
# Conflicts: # Emby.Server.Implementations/ApplicationHost.cs # Jellyfin.Api/Helpers/TranscodingJobHelper.cs
Diffstat (limited to 'Jellyfin.Api/Controllers/FilterController.cs')
-rw-r--r--Jellyfin.Api/Controllers/FilterController.cs13
1 files changed, 6 insertions, 7 deletions
diff --git a/Jellyfin.Api/Controllers/FilterController.cs b/Jellyfin.Api/Controllers/FilterController.cs
index 8a0a6ad86..9ba5e1161 100644
--- a/Jellyfin.Api/Controllers/FilterController.cs
+++ b/Jellyfin.Api/Controllers/FilterController.cs
@@ -1,5 +1,4 @@
using System;
-using System.Diagnostics.CodeAnalysis;
using System.Linq;
using Jellyfin.Api.Constants;
using MediaBrowser.Controller.Dto;
@@ -57,9 +56,9 @@ namespace Jellyfin.Api.Controllers
? null
: _libraryManager.GetItemById(parentId);
- var user = userId == null || userId == Guid.Empty
- ? null
- : _userManager.GetUserById(userId.Value);
+ var user = userId.HasValue && !userId.Equals(Guid.Empty)
+ ? _userManager.GetUserById(userId.Value)
+ : null;
if (string.Equals(includeItemTypes, nameof(BoxSet), StringComparison.OrdinalIgnoreCase)
|| string.Equals(includeItemTypes, nameof(Playlist), StringComparison.OrdinalIgnoreCase)
@@ -152,9 +151,9 @@ namespace Jellyfin.Api.Controllers
? null
: _libraryManager.GetItemById(parentId);
- var user = userId == null || userId == Guid.Empty
- ? null
- : _userManager.GetUserById(userId.Value);
+ var user = userId.HasValue && !userId.Equals(Guid.Empty)
+ ? _userManager.GetUserById(userId.Value)
+ : null;
if (string.Equals(includeItemTypes, nameof(BoxSet), StringComparison.OrdinalIgnoreCase)
|| string.Equals(includeItemTypes, nameof(Playlist), StringComparison.OrdinalIgnoreCase)