aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Collections
diff options
context:
space:
mode:
authorBond_009 <bond.009@outlook.com>2022-12-05 15:01:13 +0100
committerBond_009 <bond.009@outlook.com>2022-12-05 15:01:13 +0100
commit52194f56b5f07e3ae01e2fb6d121452e37d1e93f (patch)
treefd638972f72ec49734ad07f831a3aae3b2501a1d /Emby.Server.Implementations/Collections
parentc7d50d640e614a3c13699e3041fbfcb258861c5a (diff)
Replace != null with is not null
Diffstat (limited to 'Emby.Server.Implementations/Collections')
-rw-r--r--Emby.Server.Implementations/Collections/CollectionImageProvider.cs6
-rw-r--r--Emby.Server.Implementations/Collections/CollectionManager.cs6
2 files changed, 6 insertions, 6 deletions
diff --git a/Emby.Server.Implementations/Collections/CollectionImageProvider.cs b/Emby.Server.Implementations/Collections/CollectionImageProvider.cs
index ca8409402..c31bb4fb9 100644
--- a/Emby.Server.Implementations/Collections/CollectionImageProvider.cs
+++ b/Emby.Server.Implementations/Collections/CollectionImageProvider.cs
@@ -59,7 +59,7 @@ namespace Emby.Server.Implementations.Collections
var episode = subItem as Episode;
var series = episode?.Series;
- if (series != null && series.HasImage(ImageType.Primary))
+ if (series is not null && series.HasImage(ImageType.Primary))
{
return series;
}
@@ -71,7 +71,7 @@ namespace Emby.Server.Implementations.Collections
var parent = subItem.GetOwner() ?? subItem.GetParent();
- if (parent != null && parent.HasImage(ImageType.Primary))
+ if (parent is not null && parent.HasImage(ImageType.Primary))
{
if (parent is MusicAlbum)
{
@@ -81,7 +81,7 @@ namespace Emby.Server.Implementations.Collections
return null;
})
- .Where(i => i != null)
+ .Where(i => i is not null)
.GroupBy(x => x!.Id) // We removed the null values
.Select(x => x.First())
.ToList()!; // Again... the list doesn't contain any null values
diff --git a/Emby.Server.Implementations/Collections/CollectionManager.cs b/Emby.Server.Implementations/Collections/CollectionManager.cs
index 701c7b61d..b53c8ca51 100644
--- a/Emby.Server.Implementations/Collections/CollectionManager.cs
+++ b/Emby.Server.Implementations/Collections/CollectionManager.cs
@@ -81,7 +81,7 @@ namespace Emby.Server.Implementations.Collections
internal async Task<Folder?> EnsureLibraryFolder(string path, bool createIfNeeded)
{
var existingFolder = FindFolders(path).FirstOrDefault();
- if (existingFolder != null)
+ if (existingFolder is not null)
{
return existingFolder;
}
@@ -265,7 +265,7 @@ namespace Emby.Server.Implementations.Collections
{
var childItem = _libraryManager.GetItemById(guidId);
- var child = collection.LinkedChildren.FirstOrDefault(i => (i.ItemId.HasValue && i.ItemId.Value.Equals(guidId)) || (childItem != null && string.Equals(childItem.Path, i.Path, StringComparison.OrdinalIgnoreCase)));
+ var child = collection.LinkedChildren.FirstOrDefault(i => (i.ItemId.HasValue && i.ItemId.Value.Equals(guidId)) || (childItem is not null && string.Equals(childItem.Path, i.Path, StringComparison.OrdinalIgnoreCase)));
if (child is null)
{
@@ -275,7 +275,7 @@ namespace Emby.Server.Implementations.Collections
list.Add(child);
- if (childItem != null)
+ if (childItem is not null)
{
itemList.Add(childItem);
}