Add Dashboard theme.

This commit is contained in:
Patrick Barron 2020-07-27 20:44:46 -04:00
parent 68a185fd02
commit 7d6c1befe5
2 changed files with 9 additions and 0 deletions

View File

@ -26,6 +26,7 @@ namespace Jellyfin.Data.Entities
SkipBackwardLength = 10000; SkipBackwardLength = 10000;
ScrollDirection = ScrollDirection.Horizontal; ScrollDirection = ScrollDirection.Horizontal;
ChromecastVersion = ChromecastVersion.Stable; ChromecastVersion = ChromecastVersion.Stable;
DashboardTheme = string.Empty;
HomeSections = new HashSet<HomeSection>(); HomeSections = new HashSet<HomeSection>();
} }
@ -126,6 +127,13 @@ namespace Jellyfin.Data.Entities
/// </remarks> /// </remarks>
public bool EnableNextVideoInfoOverlay { get; set; } public bool EnableNextVideoInfoOverlay { get; set; }
/// <summary>
/// Gets or sets the dashboard theme.
/// </summary>
[MaxLength(32)]
[StringLength(32)]
public string DashboardTheme { get; set; }
/// <summary> /// <summary>
/// Gets or sets the home sections. /// Gets or sets the home sections.
/// </summary> /// </summary>

View File

@ -144,6 +144,7 @@ namespace MediaBrowser.Api
: true; : true;
prefs.SkipBackwardLength = request.CustomPrefs.TryGetValue("skipBackLength", out var skipBackLength) ? int.Parse(skipBackLength) : 10000; prefs.SkipBackwardLength = request.CustomPrefs.TryGetValue("skipBackLength", out var skipBackLength) ? int.Parse(skipBackLength) : 10000;
prefs.SkipForwardLength = request.CustomPrefs.TryGetValue("skipForwardLength", out var skipForwardLength) ? int.Parse(skipForwardLength) : 30000; prefs.SkipForwardLength = request.CustomPrefs.TryGetValue("skipForwardLength", out var skipForwardLength) ? int.Parse(skipForwardLength) : 30000;
prefs.DashboardTheme = request.CustomPrefs.TryGetValue("dashboardTheme", out var theme) ? theme : string.Empty;
prefs.HomeSections.Clear(); prefs.HomeSections.Clear();
foreach (var key in request.CustomPrefs.Keys.Where(key => key.StartsWith("homesection"))) foreach (var key in request.CustomPrefs.Keys.Where(key => key.StartsWith("homesection")))