diff options
| author | Shadowghost <Ghost_of_Stone@web.de> | 2022-12-07 17:40:24 +0100 |
|---|---|---|
| committer | Shadowghost <Ghost_of_Stone@web.de> | 2022-12-07 17:40:24 +0100 |
| commit | 2c86bd1875e6e85d5867618e992d850453dae663 (patch) | |
| tree | 671070fb246fd3821bf6f1e58a01c402a2f969d1 /Jellyfin.Api/Controllers/SearchController.cs | |
| parent | dd5f90802e71083347b6095eb79a9de0b9d34615 (diff) | |
| parent | 3cb7fe50127b1a8158186b390836ee25ae5a50fd (diff) | |
Merge branch 'master' into network-rewrite
Diffstat (limited to 'Jellyfin.Api/Controllers/SearchController.cs')
| -rw-r--r-- | Jellyfin.Api/Controllers/SearchController.cs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Jellyfin.Api/Controllers/SearchController.cs b/Jellyfin.Api/Controllers/SearchController.cs index aeed0c0d6..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; @@ -221,18 +221,18 @@ namespace Jellyfin.Api.Controllers { var itemWithImage = item.HasImage(ImageType.Thumb) ? item : null; - if (itemWithImage == null && item is Episode) + if (itemWithImage is null && item is Episode) { itemWithImage = GetParentWithImage<Series>(item, ImageType.Thumb); } 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); |
