From 52194f56b5f07e3ae01e2fb6d121452e37d1e93f Mon Sep 17 00:00:00 2001 From: Bond_009 Date: Mon, 5 Dec 2022 15:01:13 +0100 Subject: Replace != null with is not null --- Jellyfin.Api/Controllers/ImageController.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'Jellyfin.Api/Controllers/ImageController.cs') diff --git a/Jellyfin.Api/Controllers/ImageController.cs b/Jellyfin.Api/Controllers/ImageController.cs index adcac8e97..260b9536e 100644 --- a/Jellyfin.Api/Controllers/ImageController.cs +++ b/Jellyfin.Api/Controllers/ImageController.cs @@ -110,7 +110,7 @@ namespace Jellyfin.Api.Controllers // Handle image/png; charset=utf-8 var mimeType = Request.ContentType?.Split(';').FirstOrDefault(); var userDataPath = Path.Combine(_serverConfigurationManager.ApplicationPaths.UserConfigurationDirectoryPath, user.Username); - if (user.ProfileImage != null) + if (user.ProfileImage is not null) { await _userManager.ClearProfileImageAsync(user).ConfigureAwait(false); } @@ -157,7 +157,7 @@ namespace Jellyfin.Api.Controllers // Handle image/png; charset=utf-8 var mimeType = Request.ContentType?.Split(';').FirstOrDefault(); var userDataPath = Path.Combine(_serverConfigurationManager.ApplicationPaths.UserConfigurationDirectoryPath, user.Username); - if (user.ProfileImage != null) + if (user.ProfileImage is not null) { await _userManager.ClearProfileImageAsync(user).ConfigureAwait(false); } @@ -452,7 +452,7 @@ namespace Jellyfin.Api.Controllers { var info = GetImageInfo(item, image, null); - if (info != null) + if (info is not null) { list.Add(info); } @@ -470,7 +470,7 @@ namespace Jellyfin.Api.Controllers { var info = GetImageInfo(item, image, index); - if (info != null) + if (info is not null) { list.Add(info); } @@ -1968,7 +1968,7 @@ namespace Jellyfin.Api.Controllers { "realTimeInfo.dlna.org", "DLNA.ORG_TLAG=*" } }; - if (!imageInfo.IsLocalFile && item != null) + if (!imageInfo.IsLocalFile && item is not null) { imageInfo = await _libraryManager.ConvertImageToLocal(item, imageInfo, imageIndex ?? 0).ConfigureAwait(false); } -- cgit v1.2.3