mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-17 22:43:07 +03:00
Replace != null with is not null
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user