Switch to unstable chromecast version.
This commit is contained in:
parent
a6bc4c688d
commit
ad32800504
|
@ -11,8 +11,8 @@
|
|||
Stable = 0,
|
||||
|
||||
/// <summary>
|
||||
/// Nightly Chromecast version.
|
||||
/// Unstable Chromecast version.
|
||||
/// </summary>
|
||||
Nightly = 1
|
||||
Unstable = 1
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
|
@ -64,6 +65,13 @@ namespace Jellyfin.Server.Migrations.Routines
|
|||
HomeSectionType.None,
|
||||
};
|
||||
|
||||
var chromecastDict = new Dictionary<string, ChromecastVersion>(StringComparer.OrdinalIgnoreCase)
|
||||
{
|
||||
{ "stable", ChromecastVersion.Stable },
|
||||
{ "nightly", ChromecastVersion.Unstable },
|
||||
{ "unstable", ChromecastVersion.Unstable }
|
||||
};
|
||||
|
||||
var dbFilePath = Path.Combine(_paths.DataPath, DbFilename);
|
||||
using (var connection = SQLite3.Open(dbFilePath, ConnectionFlags.ReadOnly, null))
|
||||
{
|
||||
|
@ -74,9 +82,7 @@ namespace Jellyfin.Server.Migrations.Routines
|
|||
{
|
||||
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
|
||||
? chromecastDict[version]
|
||||
: ChromecastVersion.Stable;
|
||||
|
||||
var displayPreferences = new DisplayPreferences(new Guid(result[1].ToBlob()), result[2].ToString())
|
||||
|
|
Loading…
Reference in New Issue
Block a user