use int.Parse

pull/5873/head
cvium 4 years ago
parent cbb855e65f
commit 4d7c1fbdca

@ -126,11 +126,11 @@ namespace Jellyfin.Server.Migrations.Routines
ShowSidebar = dto.ShowSidebar, ShowSidebar = dto.ShowSidebar,
ScrollDirection = dto.ScrollDirection, ScrollDirection = dto.ScrollDirection,
ChromecastVersion = chromecastVersion, ChromecastVersion = chromecastVersion,
SkipForwardLength = dto.CustomPrefs.TryGetValue("skipForwardLength", out var length) && !string.IsNullOrEmpty(length) SkipForwardLength = dto.CustomPrefs.TryGetValue("skipForwardLength", out var length) && int.TryParse(length, out var skipForwardLength)
? int.Parse(length, CultureInfo.InvariantCulture) ? skipForwardLength
: 30000, : 30000,
SkipBackwardLength = dto.CustomPrefs.TryGetValue("skipBackLength", out length) && !string.IsNullOrEmpty(length) SkipBackwardLength = dto.CustomPrefs.TryGetValue("skipBackLength", out length) && !string.IsNullOrEmpty(length) && int.TryParse(length, out var skipBackwardLength)
? int.Parse(length, CultureInfo.InvariantCulture) ? skipBackwardLength
: 10000, : 10000,
EnableNextVideoInfoOverlay = dto.CustomPrefs.TryGetValue("enableNextVideoInfoOverlay", out var enabled) && !string.IsNullOrEmpty(enabled) EnableNextVideoInfoOverlay = dto.CustomPrefs.TryGetValue("enableNextVideoInfoOverlay", out var enabled) && !string.IsNullOrEmpty(enabled)
? bool.Parse(enabled) ? bool.Parse(enabled)

Loading…
Cancel
Save