The Free Software Media System - Server Backend & API
Check for empty string when migrating displaypreferences
cviumcbb855e65fd5
diff --git a/Jellyfin.Server/Migrations/Routines/MigrateDisplayPreferencesDb.cs b/Jellyfin.Server/Migrations/Routines/MigrateDisplayPreferencesDb.csindex 07829c6969..5dc8c90d44 100644--- a/Jellyfin.Server/Migrations/Routines/MigrateDisplayPreferencesDb.cs+++ b/Jellyfin.Server/Migrations/Routines/MigrateDisplayPreferencesDb.cs@@ -126,13 +126,13 @@ namespace Jellyfin.Server.Migrations.RoutinesShowSidebar = dto.ShowSidebar,ScrollDirection = dto.ScrollDirection,ChromecastVersion = chromecastVersion,- SkipForwardLength = dto.CustomPrefs.TryGetValue("skipForwardLength", out var length)+ SkipForwardLength = dto.CustomPrefs.TryGetValue("skipForwardLength", out var length) && !string.IsNullOrEmpty(length)? int.Parse(length, CultureInfo.InvariantCulture): 30000,- SkipBackwardLength = dto.CustomPrefs.TryGetValue("skipBackLength", out length)+ SkipBackwardLength = dto.CustomPrefs.TryGetValue("skipBackLength", out length) && !string.IsNullOrEmpty(length)? int.Parse(length, CultureInfo.InvariantCulture): 10000,- EnableNextVideoInfoOverlay = dto.CustomPrefs.TryGetValue("enableNextVideoInfoOverlay", out var enabled)+ EnableNextVideoInfoOverlay = dto.CustomPrefs.TryGetValue("enableNextVideoInfoOverlay", out var enabled) && !string.IsNullOrEmpty(enabled)? bool.Parse(enabled): true,DashboardTheme = dto.CustomPrefs.TryGetValue("dashboardtheme", out var theme) ? theme : string.Empty,