aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Server
diff options
context:
space:
mode:
Diffstat (limited to 'Jellyfin.Server')
-rw-r--r--Jellyfin.Server/Filters/AdditionalModelFilter.cs2
-rw-r--r--Jellyfin.Server/Migrations/JellyfinMigrationService.cs6
-rw-r--r--Jellyfin.Server/Migrations/Routines/MigrateLibraryDb.cs2
-rw-r--r--Jellyfin.Server/ServerSetupApp/SetupServer.cs2
4 files changed, 6 insertions, 6 deletions
diff --git a/Jellyfin.Server/Filters/AdditionalModelFilter.cs b/Jellyfin.Server/Filters/AdditionalModelFilter.cs
index 421eeecda..58d37db5a 100644
--- a/Jellyfin.Server/Filters/AdditionalModelFilter.cs
+++ b/Jellyfin.Server/Filters/AdditionalModelFilter.cs
@@ -175,7 +175,7 @@ namespace Jellyfin.Server.Filters
// Manually generate sync play GroupUpdate messages.
var groupUpdateTypes = typeof(GroupUpdate<>).Assembly.GetTypes()
- .Where(t => t.BaseType != null
+ .Where(t => t.BaseType is not null
&& t.BaseType.IsGenericType
&& t.BaseType.GetGenericTypeDefinition() == typeof(GroupUpdate<>))
.ToList();
diff --git a/Jellyfin.Server/Migrations/JellyfinMigrationService.cs b/Jellyfin.Server/Migrations/JellyfinMigrationService.cs
index fe191916c..188d3c4a9 100644
--- a/Jellyfin.Server/Migrations/JellyfinMigrationService.cs
+++ b/Jellyfin.Server/Migrations/JellyfinMigrationService.cs
@@ -62,7 +62,7 @@ internal class JellyfinMigrationService
#pragma warning disable CS0618 // Type or member is obsolete
Migrations = [.. typeof(IMigrationRoutine).Assembly.GetTypes().Where(e => typeof(IMigrationRoutine).IsAssignableFrom(e) || typeof(IAsyncMigrationRoutine).IsAssignableFrom(e))
.Select(e => (Type: e, Metadata: e.GetCustomAttribute<JellyfinMigrationAttribute>(), Backup: e.GetCustomAttributes<JellyfinMigrationBackupAttribute>()))
- .Where(e => e.Metadata != null)
+ .Where(e => e.Metadata is not null)
.GroupBy(e => e.Metadata!.Stage)
.Select(f =>
{
@@ -137,7 +137,7 @@ internal class JellyfinMigrationService
var migrationOptions = File.Exists(migrationConfigPath)
? (MigrationOptions)xmlSerializer.DeserializeFromFile(typeof(MigrationOptions), migrationConfigPath)!
: null;
- if (migrationOptions != null && migrationOptions.Applied.Count > 0)
+ if (migrationOptions is not null && migrationOptions.Applied.Count > 0)
{
logger.LogInformation("Old migration style migration.xml detected. Migrate now.");
try
@@ -383,7 +383,7 @@ internal class JellyfinMigrationService
}
}
- if (backupInstruction.JellyfinDb && _jellyfinDatabaseProvider != null)
+ if (backupInstruction.JellyfinDb && _jellyfinDatabaseProvider is not null)
{
logger.LogInformation("A migration will attempt to modify the jellyfin.db, will attempt to backup the file now.");
_backupKey = (_backupKey.LibraryDb, await _jellyfinDatabaseProvider.MigrationBackupFast(CancellationToken.None).ConfigureAwait(false), _backupKey.FullBackup);
diff --git a/Jellyfin.Server/Migrations/Routines/MigrateLibraryDb.cs b/Jellyfin.Server/Migrations/Routines/MigrateLibraryDb.cs
index e04a2737a..e8ff00dd2 100644
--- a/Jellyfin.Server/Migrations/Routines/MigrateLibraryDb.cs
+++ b/Jellyfin.Server/Migrations/Routines/MigrateLibraryDb.cs
@@ -1189,7 +1189,7 @@ internal class MigrateLibraryDb : IDatabaseMigrationRoutine
ItemId = baseItemId,
Id = Guid.NewGuid(),
Path = e.Path,
- Blurhash = e.BlurHash != null ? Encoding.UTF8.GetBytes(e.BlurHash) : null,
+ Blurhash = e.BlurHash is not null ? Encoding.UTF8.GetBytes(e.BlurHash) : null,
DateModified = e.DateModified,
Height = e.Height,
Width = e.Width,
diff --git a/Jellyfin.Server/ServerSetupApp/SetupServer.cs b/Jellyfin.Server/ServerSetupApp/SetupServer.cs
index 92e012940..72626e853 100644
--- a/Jellyfin.Server/ServerSetupApp/SetupServer.cs
+++ b/Jellyfin.Server/ServerSetupApp/SetupServer.cs
@@ -98,7 +98,7 @@ public sealed class SetupServer : IDisposable
var maxLevel = logEntry.LogLevel;
var stack = new Stack<StartupLogTopic>(children);
- while (maxLevel != LogLevel.Error && stack.Count > 0 && (logEntry = stack.Pop()) != null) // error is the highest inherted error level.
+ while (maxLevel != LogLevel.Error && stack.Count > 0 && (logEntry = stack.Pop()) is not null) // error is the highest inherted error level.
{
maxLevel = maxLevel < logEntry.LogLevel ? logEntry.LogLevel : maxLevel;
foreach (var child in logEntry.Children)