Switch to unstable chromecast version.

pull/3578/head
Patrick Barron 4 years ago
parent a6bc4c688d
commit ad32800504

@ -11,8 +11,8 @@
Stable = 0, Stable = 0,
/// <summary> /// <summary>
/// Nightly Chromecast version. /// Unstable Chromecast version.
/// </summary> /// </summary>
Nightly = 1 Unstable = 1
} }
} }

@ -1,4 +1,5 @@
using System; using System;
using System.Collections.Generic;
using System.Globalization; using System.Globalization;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
@ -64,6 +65,13 @@ namespace Jellyfin.Server.Migrations.Routines
HomeSectionType.None, 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); var dbFilePath = Path.Combine(_paths.DataPath, DbFilename);
using (var connection = SQLite3.Open(dbFilePath, ConnectionFlags.ReadOnly, null)) 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 dto = JsonSerializer.Deserialize<DisplayPreferencesDto>(result[3].ToString(), _jsonOptions);
var chromecastVersion = dto.CustomPrefs.TryGetValue("chromecastVersion", out var version) var chromecastVersion = dto.CustomPrefs.TryGetValue("chromecastVersion", out var version)
? Enum.TryParse<ChromecastVersion>(version, true, out var parsed) ? chromecastDict[version]
? parsed
: ChromecastVersion.Stable
: ChromecastVersion.Stable; : ChromecastVersion.Stable;
var displayPreferences = new DisplayPreferences(new Guid(result[1].ToBlob()), result[2].ToString()) var displayPreferences = new DisplayPreferences(new Guid(result[1].ToBlob()), result[2].ToString())

Loading…
Cancel
Save