aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Library/UserViewManager.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 /Emby.Server.Implementations/Library/UserViewManager.cs
parent21ef6661d6ef48fb18da10b8e0abf2c1d1345ed1 (diff)
parentf50a250cd9fac47bcbd9a05e99c8ffe4d294e320 (diff)
Merge pull request #7346 from Bond-009/guid
Optimize Guid comparisons
Diffstat (limited to 'Emby.Server.Implementations/Library/UserViewManager.cs')
-rw-r--r--Emby.Server.Implementations/Library/UserViewManager.cs6
1 files changed, 3 insertions, 3 deletions
diff --git a/Emby.Server.Implementations/Library/UserViewManager.cs b/Emby.Server.Implementations/Library/UserViewManager.cs
index b00bc72e6..ec411aa3b 100644
--- a/Emby.Server.Implementations/Library/UserViewManager.cs
+++ b/Emby.Server.Implementations/Library/UserViewManager.cs
@@ -142,7 +142,7 @@ namespace Emby.Server.Implementations.Library
if (index == -1
&& i is UserView view
- && view.DisplayParentId != Guid.Empty)
+ && !view.DisplayParentId.Equals(default))
{
index = Array.IndexOf(orders, view.DisplayParentId);
}
@@ -214,7 +214,7 @@ namespace Emby.Server.Implementations.Library
}
else
{
- var current = list.FirstOrDefault(i => i.Item1 != null && i.Item1.Id == container.Id);
+ var current = list.FirstOrDefault(i => i.Item1 != null && i.Item1.Id.Equals(container.Id));
if (current != null)
{
@@ -244,7 +244,7 @@ namespace Emby.Server.Implementations.Library
var parents = new List<BaseItem>();
- if (!parentId.Equals(Guid.Empty))
+ if (!parentId.Equals(default))
{
var parentItem = _libraryManager.GetItemById(parentId);
if (parentItem is Channel)