aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Server.Implementations/Events
diff options
context:
space:
mode:
Diffstat (limited to 'Jellyfin.Server.Implementations/Events')
-rw-r--r--Jellyfin.Server.Implementations/Events/Consumers/Session/PlaybackStartLogger.cs6
-rw-r--r--Jellyfin.Server.Implementations/Events/Consumers/Session/PlaybackStopLogger.cs8
-rw-r--r--Jellyfin.Server.Implementations/Events/EventManager.cs2
3 files changed, 8 insertions, 8 deletions
diff --git a/Jellyfin.Server.Implementations/Events/Consumers/Session/PlaybackStartLogger.cs b/Jellyfin.Server.Implementations/Events/Consumers/Session/PlaybackStartLogger.cs
index aa6015caa..aeb62e814 100644
--- a/Jellyfin.Server.Implementations/Events/Consumers/Session/PlaybackStartLogger.cs
+++ b/Jellyfin.Server.Implementations/Events/Consumers/Session/PlaybackStartLogger.cs
@@ -38,13 +38,13 @@ namespace Jellyfin.Server.Implementations.Events.Consumers.Session
/// <inheritdoc />
public async Task OnEvent(PlaybackStartEventArgs eventArgs)
{
- if (eventArgs.MediaInfo == null)
+ if (eventArgs.MediaInfo is null)
{
_logger.LogWarning("PlaybackStart reported with null media info.");
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 1648b1b47..dd7290fb8 100644
--- a/Jellyfin.Server.Implementations/Events/Consumers/Session/PlaybackStopLogger.cs
+++ b/Jellyfin.Server.Implementations/Events/Consumers/Session/PlaybackStopLogger.cs
@@ -40,13 +40,13 @@ namespace Jellyfin.Server.Implementations.Events.Consumers.Session
{
var item = eventArgs.MediaInfo;
- if (item == null)
+ if (item is null)
{
_logger.LogWarning("PlaybackStopped reported with null media info.");
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;
@@ -60,7 +60,7 @@ namespace Jellyfin.Server.Implementations.Events.Consumers.Session
var user = eventArgs.Users[0];
var notificationType = GetPlaybackStoppedNotificationType(item.MediaType);
- if (notificationType == null)
+ if (notificationType is null)
{
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;
}
diff --git a/Jellyfin.Server.Implementations/Events/EventManager.cs b/Jellyfin.Server.Implementations/Events/EventManager.cs
index 7f7c4750d..f49ae8e27 100644
--- a/Jellyfin.Server.Implementations/Events/EventManager.cs
+++ b/Jellyfin.Server.Implementations/Events/EventManager.cs
@@ -44,7 +44,7 @@ namespace Jellyfin.Server.Implementations.Events
where T : EventArgs
{
using var scope = _appHost.ServiceProvider?.CreateScope();
- if (scope == null)
+ if (scope is null)
{
return;
}