diff options
| author | Patrick Barron <barronpm@gmail.com> | 2020-07-27 20:44:46 -0400 |
|---|---|---|
| committer | Patrick Barron <barronpm@gmail.com> | 2020-07-27 20:44:46 -0400 |
| commit | 7d6c1befe51ec20c4727426ae7bff8bb316e3495 (patch) | |
| tree | 301cbff85f6e8e85801c7e61c48b153c2a5bbcd4 | |
| parent | 68a185fd02844698ac5ecd5618d590ae254d95cf (diff) | |
Add Dashboard theme.
| -rw-r--r-- | Jellyfin.Data/Entities/DisplayPreferences.cs | 8 | ||||
| -rw-r--r-- | MediaBrowser.Api/DisplayPreferencesService.cs | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/Jellyfin.Data/Entities/DisplayPreferences.cs b/Jellyfin.Data/Entities/DisplayPreferences.cs index 44b70d970..d2cf99195 100644 --- a/Jellyfin.Data/Entities/DisplayPreferences.cs +++ b/Jellyfin.Data/Entities/DisplayPreferences.cs @@ -26,6 +26,7 @@ namespace Jellyfin.Data.Entities SkipBackwardLength = 10000; ScrollDirection = ScrollDirection.Horizontal; ChromecastVersion = ChromecastVersion.Stable; + DashboardTheme = string.Empty; HomeSections = new HashSet<HomeSection>(); } @@ -127,6 +128,13 @@ namespace Jellyfin.Data.Entities public bool EnableNextVideoInfoOverlay { get; set; } /// <summary> + /// Gets or sets the dashboard theme. + /// </summary> + [MaxLength(32)] + [StringLength(32)] + public string DashboardTheme { get; set; } + + /// <summary> /// Gets or sets the home sections. /// </summary> public virtual ICollection<HomeSection> HomeSections { get; protected set; } diff --git a/MediaBrowser.Api/DisplayPreferencesService.cs b/MediaBrowser.Api/DisplayPreferencesService.cs index 416d63100..2cc7db624 100644 --- a/MediaBrowser.Api/DisplayPreferencesService.cs +++ b/MediaBrowser.Api/DisplayPreferencesService.cs @@ -144,6 +144,7 @@ namespace MediaBrowser.Api : true; 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.DashboardTheme = request.CustomPrefs.TryGetValue("dashboardTheme", out var theme) ? theme : string.Empty; prefs.HomeSections.Clear(); foreach (var key in request.CustomPrefs.Keys.Where(key => key.StartsWith("homesection"))) |
