diff options
| author | Bond_009 <bond.009@outlook.com> | 2022-12-05 15:01:13 +0100 |
|---|---|---|
| committer | Bond_009 <bond.009@outlook.com> | 2022-12-05 15:01:13 +0100 |
| commit | 52194f56b5f07e3ae01e2fb6d121452e37d1e93f (patch) | |
| tree | fd638972f72ec49734ad07f831a3aae3b2501a1d /Jellyfin.Api/Controllers/SearchController.cs | |
| parent | c7d50d640e614a3c13699e3041fbfcb258861c5a (diff) | |
Replace != null with is not null
Diffstat (limited to 'Jellyfin.Api/Controllers/SearchController.cs')
| -rw-r--r-- | Jellyfin.Api/Controllers/SearchController.cs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Jellyfin.Api/Controllers/SearchController.cs b/Jellyfin.Api/Controllers/SearchController.cs index 3c0603a19..3b7719f37 100644 --- a/Jellyfin.Api/Controllers/SearchController.cs +++ b/Jellyfin.Api/Controllers/SearchController.cs @@ -161,7 +161,7 @@ namespace Jellyfin.Api.Controllers var primaryImageTag = _imageProcessor.GetImageCacheTag(item, ImageType.Primary); - if (primaryImageTag != null) + if (primaryImageTag is not null) { result.PrimaryImageTag = primaryImageTag; result.PrimaryImageAspectRatio = _dtoService.GetPrimaryImageAspectRatio(item); @@ -195,7 +195,7 @@ namespace Jellyfin.Api.Controllers MusicAlbum musicAlbum = song.AlbumEntity; - if (musicAlbum != null) + if (musicAlbum is not null) { result.Album = musicAlbum.Name; result.AlbumId = musicAlbum.Id; @@ -228,11 +228,11 @@ namespace Jellyfin.Api.Controllers itemWithImage ??= GetParentWithImage<BaseItem>(item, ImageType.Thumb); - if (itemWithImage != null) + if (itemWithImage is not null) { var tag = _imageProcessor.GetImageCacheTag(itemWithImage, ImageType.Thumb); - if (tag != null) + if (tag is not null) { hint.ThumbImageTag = tag; hint.ThumbImageItemId = itemWithImage.Id.ToString("N", CultureInfo.InvariantCulture); @@ -245,11 +245,11 @@ namespace Jellyfin.Api.Controllers var itemWithImage = (item.HasImage(ImageType.Backdrop) ? item : null) ?? GetParentWithImage<BaseItem>(item, ImageType.Backdrop); - if (itemWithImage != null) + if (itemWithImage is not null) { var tag = _imageProcessor.GetImageCacheTag(itemWithImage, ImageType.Backdrop); - if (tag != null) + if (tag is not null) { hint.BackdropImageTag = tag; hint.BackdropImageItemId = itemWithImage.Id.ToString("N", CultureInfo.InvariantCulture); |
