Add missing format providers (fix CA1305 errors) (#8745)

This commit is contained in:
Terrance
2022-11-27 01:59:25 +00:00
committed by GitHub
parent 89772032e8
commit 692a62ab4f
3 changed files with 7 additions and 3 deletions

View File

@@ -178,7 +178,7 @@ namespace Jellyfin.Api.Controllers
foreach (var key in displayPreferences.CustomPrefs.Keys.Where(key => key.StartsWith("homesection", StringComparison.OrdinalIgnoreCase)))
{
var order = int.Parse(key.AsSpan().Slice("homesection".Length));
var order = int.Parse(key.AsSpan().Slice("homesection".Length), NumberStyles.Any, CultureInfo.InvariantCulture);
if (!Enum.TryParse<HomeSectionType>(displayPreferences.CustomPrefs[key], true, out var type))
{
type = order < 8 ? defaults[order] : HomeSectionType.None;