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 --- .../Events/Consumers/Session/PlaybackStartLogger.cs | 4 ++-- .../Events/Consumers/Session/PlaybackStopLogger.cs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'Jellyfin.Server.Implementations/Events') diff --git a/Jellyfin.Server.Implementations/Events/Consumers/Session/PlaybackStartLogger.cs b/Jellyfin.Server.Implementations/Events/Consumers/Session/PlaybackStartLogger.cs index bb98a6c34..aeb62e814 100644 --- a/Jellyfin.Server.Implementations/Events/Consumers/Session/PlaybackStartLogger.cs +++ b/Jellyfin.Server.Implementations/Events/Consumers/Session/PlaybackStartLogger.cs @@ -44,7 +44,7 @@ namespace Jellyfin.Server.Implementations.Events.Consumers.Session return; } - if (eventArgs.Item != null && eventArgs.Item.IsThemeMedia) + if (eventArgs.Item is not null && eventArgs.Item.IsThemeMedia) { // Don't report theme song or local trailer playback return; @@ -78,7 +78,7 @@ namespace Jellyfin.Server.Implementations.Events.Consumers.Session name = item.SeriesName + " - " + name; } - if (item.Artists != null && item.Artists.Count > 0) + if (item.Artists is not null && item.Artists.Count > 0) { name = item.Artists[0] + " - " + name; } diff --git a/Jellyfin.Server.Implementations/Events/Consumers/Session/PlaybackStopLogger.cs b/Jellyfin.Server.Implementations/Events/Consumers/Session/PlaybackStopLogger.cs index baa957390..dd7290fb8 100644 --- a/Jellyfin.Server.Implementations/Events/Consumers/Session/PlaybackStopLogger.cs +++ b/Jellyfin.Server.Implementations/Events/Consumers/Session/PlaybackStopLogger.cs @@ -46,7 +46,7 @@ namespace Jellyfin.Server.Implementations.Events.Consumers.Session return; } - if (eventArgs.Item != null && eventArgs.Item.IsThemeMedia) + if (eventArgs.Item is not null && eventArgs.Item.IsThemeMedia) { // Don't report theme song or local trailer playback return; @@ -86,7 +86,7 @@ namespace Jellyfin.Server.Implementations.Events.Consumers.Session name = item.SeriesName + " - " + name; } - if (item.Artists != null && item.Artists.Count > 0) + if (item.Artists is not null && item.Artists.Count > 0) { name = item.Artists[0] + " - " + name; } -- cgit v1.2.3