Add missing chromecast version serialization/deserialization.

pull/3578/head
Patrick Barron 4 years ago
parent 5993a4ac2d
commit 9f323e5579

@ -68,6 +68,11 @@ namespace Jellyfin.Server.Migrations.Routines
foreach (var result in results)
{
var dto = JsonSerializer.Deserialize<DisplayPreferencesDto>(result[3].ToString(), _jsonOptions);
var chromecastVersion = dto.CustomPrefs.TryGetValue("chromecastVersion", out var version)
? Enum.TryParse<ChromecastVersion>(version, true, out var parsed)
? parsed
: ChromecastVersion.Stable
: ChromecastVersion.Stable;
var displayPreferences = new DisplayPreferences(result[2].ToString(), new Guid(result[1].ToBlob()))
{
@ -79,7 +84,8 @@ namespace Jellyfin.Server.Migrations.Routines
SortOrder = dto.SortOrder,
RememberIndexing = dto.RememberIndexing,
RememberSorting = dto.RememberSorting,
ScrollDirection = dto.ScrollDirection
ScrollDirection = dto.ScrollDirection,
ChromecastVersion = chromecastVersion
};
for (int i = 0; i < 7; i++)

@ -103,6 +103,8 @@ namespace MediaBrowser.Api
dto.CustomPrefs["homesection" + homeSection.Order] = homeSection.Type.ToString().ToLowerInvariant();
}
dto.CustomPrefs["chromecastVersion"] = result.ChromecastVersion.ToString().ToLowerInvariant();
return ToOptimizedResult(dto);
}

Loading…
Cancel
Save