aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Server
diff options
context:
space:
mode:
authorBond_009 <bond.009@outlook.com>2022-12-05 15:00:20 +0100
committerBond_009 <bond.009@outlook.com>2022-12-05 15:00:20 +0100
commitc7d50d640e614a3c13699e3041fbfcb258861c5a (patch)
tree85ce1a16c1af479160b805ec098463ae457b5228 /Jellyfin.Server
parentb2def4c9ea6cf5e406bf5f865867d6cb5b54f640 (diff)
Replace == null with is null
Diffstat (limited to 'Jellyfin.Server')
-rw-r--r--Jellyfin.Server/Filters/FileResponseFilter.cs2
-rw-r--r--Jellyfin.Server/Formatters/CssOutputFormatter.cs2
-rw-r--r--Jellyfin.Server/Formatters/XmlOutputFormatter.cs2
-rw-r--r--Jellyfin.Server/Migrations/Routines/MigrateDisplayPreferencesDb.cs4
-rw-r--r--Jellyfin.Server/Migrations/Routines/MigrateUserDb.cs2
-rw-r--r--Jellyfin.Server/Program.cs2
6 files changed, 7 insertions, 7 deletions
diff --git a/Jellyfin.Server/Filters/FileResponseFilter.cs b/Jellyfin.Server/Filters/FileResponseFilter.cs
index eae9a8004..544fdbfd6 100644
--- a/Jellyfin.Server/Filters/FileResponseFilter.cs
+++ b/Jellyfin.Server/Filters/FileResponseFilter.cs
@@ -31,7 +31,7 @@ namespace Jellyfin.Server.Filters
.FirstOrDefault(o => o.Key.Equals(SuccessCode, StringComparison.Ordinal));
// Operation doesn't have a response.
- if (response.Value == null)
+ if (response.Value is null)
{
continue;
}
diff --git a/Jellyfin.Server/Formatters/CssOutputFormatter.cs b/Jellyfin.Server/Formatters/CssOutputFormatter.cs
index cfc9d1ad3..fdaa48f84 100644
--- a/Jellyfin.Server/Formatters/CssOutputFormatter.cs
+++ b/Jellyfin.Server/Formatters/CssOutputFormatter.cs
@@ -30,7 +30,7 @@ namespace Jellyfin.Server.Formatters
public override Task WriteResponseBodyAsync(OutputFormatterWriteContext context, Encoding selectedEncoding)
{
var stringResponse = context.Object?.ToString();
- return stringResponse == null ? Task.CompletedTask : context.HttpContext.Response.WriteAsync(stringResponse);
+ return stringResponse is null ? Task.CompletedTask : context.HttpContext.Response.WriteAsync(stringResponse);
}
}
}
diff --git a/Jellyfin.Server/Formatters/XmlOutputFormatter.cs b/Jellyfin.Server/Formatters/XmlOutputFormatter.cs
index be0baea2d..156368d69 100644
--- a/Jellyfin.Server/Formatters/XmlOutputFormatter.cs
+++ b/Jellyfin.Server/Formatters/XmlOutputFormatter.cs
@@ -27,7 +27,7 @@ namespace Jellyfin.Server.Formatters
public override Task WriteResponseBodyAsync(OutputFormatterWriteContext context, Encoding selectedEncoding)
{
var stringResponse = context.Object?.ToString();
- return stringResponse == null ? Task.CompletedTask : context.HttpContext.Response.WriteAsync(stringResponse);
+ return stringResponse is null ? Task.CompletedTask : context.HttpContext.Response.WriteAsync(stringResponse);
}
}
}
diff --git a/Jellyfin.Server/Migrations/Routines/MigrateDisplayPreferencesDb.cs b/Jellyfin.Server/Migrations/Routines/MigrateDisplayPreferencesDb.cs
index 37716482c..0fad77cfe 100644
--- a/Jellyfin.Server/Migrations/Routines/MigrateDisplayPreferencesDb.cs
+++ b/Jellyfin.Server/Migrations/Routines/MigrateDisplayPreferencesDb.cs
@@ -91,7 +91,7 @@ namespace Jellyfin.Server.Migrations.Routines
foreach (var result in results)
{
var dto = JsonSerializer.Deserialize<DisplayPreferencesDto>(result[3].ToBlob(), _jsonOptions);
- if (dto == null)
+ if (dto is null)
{
continue;
}
@@ -108,7 +108,7 @@ namespace Jellyfin.Server.Migrations.Routines
displayPrefs.Add(displayPreferencesKey);
var existingUser = _userManager.GetUserById(dtoUserId);
- if (existingUser == null)
+ if (existingUser is null)
{
_logger.LogWarning("User with ID {UserId} does not exist in the database, skipping migration.", dtoUserId);
continue;
diff --git a/Jellyfin.Server/Migrations/Routines/MigrateUserDb.cs b/Jellyfin.Server/Migrations/Routines/MigrateUserDb.cs
index 0c2cc69a7..2dbd82e8f 100644
--- a/Jellyfin.Server/Migrations/Routines/MigrateUserDb.cs
+++ b/Jellyfin.Server/Migrations/Routines/MigrateUserDb.cs
@@ -76,7 +76,7 @@ namespace Jellyfin.Server.Migrations.Routines
foreach (var entry in queryResult)
{
UserMockup? mockup = JsonSerializer.Deserialize<UserMockup>(entry[2].ToBlob(), JsonDefaults.Options);
- if (mockup == null)
+ if (mockup is null)
{
continue;
}
diff --git a/Jellyfin.Server/Program.cs b/Jellyfin.Server/Program.cs
index 7ed838825..b0455aafb 100644
--- a/Jellyfin.Server/Program.cs
+++ b/Jellyfin.Server/Program.cs
@@ -677,7 +677,7 @@ namespace Jellyfin.Server
{
var xdgRuntimeDir = Environment.GetEnvironmentVariable("XDG_RUNTIME_DIR");
var socketFile = "jellyfin.sock";
- if (xdgRuntimeDir == null)
+ if (xdgRuntimeDir is null)
{
// Fall back to config dir
socketPath = Path.Join(appPaths.ConfigurationDirectoryPath, socketFile);