mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-01-15 23:58:57 +00:00
Replace != null with is not null
This commit is contained in:
@@ -81,7 +81,7 @@ namespace Emby.Server.Implementations.Images
|
||||
{
|
||||
var image = item.GetImageInfo(imageType, 0);
|
||||
|
||||
if (image != null)
|
||||
if (image is not null)
|
||||
{
|
||||
if (!image.IsLocalFile)
|
||||
{
|
||||
@@ -143,20 +143,20 @@ namespace Emby.Server.Implementations.Images
|
||||
if (useBackdrop)
|
||||
{
|
||||
var backdrop = i.GetImageInfo(ImageType.Backdrop, 0);
|
||||
if (backdrop != null && backdrop.IsLocalFile)
|
||||
if (backdrop is not null && backdrop.IsLocalFile)
|
||||
{
|
||||
return backdrop.Path;
|
||||
}
|
||||
}
|
||||
|
||||
var image = i.GetImageInfo(ImageType.Primary, 0);
|
||||
if (image != null && image.IsLocalFile)
|
||||
if (image is not null && image.IsLocalFile)
|
||||
{
|
||||
return image.Path;
|
||||
}
|
||||
|
||||
image = i.GetImageInfo(ImageType.Thumb, 0);
|
||||
if (image != null && image.IsLocalFile)
|
||||
if (image is not null && image.IsLocalFile)
|
||||
{
|
||||
return image.Path;
|
||||
}
|
||||
@@ -268,7 +268,7 @@ namespace Emby.Server.Implementations.Images
|
||||
{
|
||||
var image = item.GetImageInfo(type, 0);
|
||||
|
||||
if (image != null)
|
||||
if (image is not null)
|
||||
{
|
||||
if (!image.IsLocalFile)
|
||||
{
|
||||
|
||||
@@ -52,7 +52,7 @@ namespace Emby.Server.Implementations.Images
|
||||
if (i is Episode episode)
|
||||
{
|
||||
var series = episode.Series;
|
||||
if (series != null)
|
||||
if (series is not null)
|
||||
{
|
||||
return series;
|
||||
}
|
||||
@@ -63,7 +63,7 @@ namespace Emby.Server.Implementations.Images
|
||||
if (i is Season season)
|
||||
{
|
||||
var series = season.Series;
|
||||
if (series != null)
|
||||
if (series is not null)
|
||||
{
|
||||
return series;
|
||||
}
|
||||
@@ -74,7 +74,7 @@ namespace Emby.Server.Implementations.Images
|
||||
if (i is Audio audio)
|
||||
{
|
||||
var album = audio.AlbumEntity;
|
||||
if (album != null && album.HasImage(ImageType.Primary))
|
||||
if (album is not null && album.HasImage(ImageType.Primary))
|
||||
{
|
||||
return album;
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace Emby.Server.Implementations.Images
|
||||
if (subItem is Episode episode)
|
||||
{
|
||||
var series = episode.Series;
|
||||
if (series != null && series.HasImage(ImageType.Primary))
|
||||
if (series is not null && series.HasImage(ImageType.Primary))
|
||||
{
|
||||
return series;
|
||||
}
|
||||
@@ -47,7 +47,7 @@ namespace Emby.Server.Implementations.Images
|
||||
|
||||
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)
|
||||
{
|
||||
@@ -57,7 +57,7 @@ namespace Emby.Server.Implementations.Images
|
||||
|
||||
return null;
|
||||
})
|
||||
.Where(i => i != null)
|
||||
.Where(i => i is not null)
|
||||
.GroupBy(x => x.Id)
|
||||
.Select(x => x.First())
|
||||
.ToList();
|
||||
|
||||
Reference in New Issue
Block a user