aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Controllers/SessionController.cs
diff options
context:
space:
mode:
authorClaus Vium <cvium@users.noreply.github.com>2022-03-11 08:15:12 +0100
committerGitHub <noreply@github.com>2022-03-11 08:15:12 +0100
commit53209830e7b566949c16b43c864f6f85336cb92c (patch)
tree59a99d347cffe722da175269dfd99bac08fb7fb0 /Jellyfin.Api/Controllers/SessionController.cs
parent21ef6661d6ef48fb18da10b8e0abf2c1d1345ed1 (diff)
parentf50a250cd9fac47bcbd9a05e99c8ffe4d294e320 (diff)
Merge pull request #7346 from Bond-009/guid
Optimize Guid comparisons
Diffstat (limited to 'Jellyfin.Api/Controllers/SessionController.cs')
-rw-r--r--Jellyfin.Api/Controllers/SessionController.cs6
1 files changed, 3 insertions, 3 deletions
diff --git a/Jellyfin.Api/Controllers/SessionController.cs b/Jellyfin.Api/Controllers/SessionController.cs
index a6bbd40cc..860bccb9b 100644
--- a/Jellyfin.Api/Controllers/SessionController.cs
+++ b/Jellyfin.Api/Controllers/SessionController.cs
@@ -74,7 +74,7 @@ namespace Jellyfin.Api.Controllers
result = result.Where(i => string.Equals(i.DeviceId, deviceId, StringComparison.OrdinalIgnoreCase));
}
- if (controllableByUserId.HasValue && !controllableByUserId.Equals(Guid.Empty))
+ if (controllableByUserId.HasValue && !controllableByUserId.Equals(default))
{
result = result.Where(i => i.SupportsRemoteControl);
@@ -82,12 +82,12 @@ namespace Jellyfin.Api.Controllers
if (!user.HasPermission(PermissionKind.EnableRemoteControlOfOtherUsers))
{
- result = result.Where(i => i.UserId.Equals(Guid.Empty) || i.ContainsUser(controllableByUserId.Value));
+ result = result.Where(i => i.UserId.Equals(default) || i.ContainsUser(controllableByUserId.Value));
}
if (!user.HasPermission(PermissionKind.EnableSharedDeviceControl))
{
- result = result.Where(i => !i.UserId.Equals(Guid.Empty));
+ result = result.Where(i => !i.UserId.Equals(default));
}
if (activeWithinSeconds.HasValue && activeWithinSeconds.Value > 0)