mirror of
				https://github.com/jellyfin/jellyfin.git
				synced 2025-10-31 10:37:22 -04:00 
			
		
		
		
	Add tv home.
This commit is contained in:
		
							parent
							
								
									7d6c1befe5
								
							
						
					
					
						commit
						754837f16f
					
				| @ -27,6 +27,7 @@ namespace Jellyfin.Data.Entities | |||||||
|             ScrollDirection = ScrollDirection.Horizontal; |             ScrollDirection = ScrollDirection.Horizontal; | ||||||
|             ChromecastVersion = ChromecastVersion.Stable; |             ChromecastVersion = ChromecastVersion.Stable; | ||||||
|             DashboardTheme = string.Empty; |             DashboardTheme = string.Empty; | ||||||
|  |             TvHome = string.Empty; | ||||||
| 
 | 
 | ||||||
|             HomeSections = new HashSet<HomeSection>(); |             HomeSections = new HashSet<HomeSection>(); | ||||||
|         } |         } | ||||||
| @ -134,6 +135,13 @@ namespace Jellyfin.Data.Entities | |||||||
|         [StringLength(32)] |         [StringLength(32)] | ||||||
|         public string DashboardTheme { get; set; } |         public string DashboardTheme { get; set; } | ||||||
| 
 | 
 | ||||||
|  |         /// <summary> | ||||||
|  |         /// Gets or sets the tv home screen. | ||||||
|  |         /// </summary> | ||||||
|  |         [MaxLength(32)] | ||||||
|  |         [StringLength(32)] | ||||||
|  |         public string TvHome { get; set; } | ||||||
|  | 
 | ||||||
|         /// <summary> |         /// <summary> | ||||||
|         /// Gets or sets the home sections. |         /// Gets or sets the home sections. | ||||||
|         /// </summary> |         /// </summary> | ||||||
|  | |||||||
| @ -94,7 +94,9 @@ namespace Jellyfin.Server.Migrations.Routines | |||||||
|                             : 10000, |                             : 10000, | ||||||
|                         EnableNextVideoInfoOverlay = dto.CustomPrefs.TryGetValue("enableNextVideoInfoOverlay", out var enabled) |                         EnableNextVideoInfoOverlay = dto.CustomPrefs.TryGetValue("enableNextVideoInfoOverlay", out var enabled) | ||||||
|                             ? bool.Parse(enabled) |                             ? bool.Parse(enabled) | ||||||
|                             : true |                             : true, | ||||||
|  |                         DashboardTheme = dto.CustomPrefs.TryGetValue("dashboardtheme", out var theme) ? theme : string.Empty, | ||||||
|  |                         TvHome = dto.CustomPrefs.TryGetValue("tvhome", out var home) ? home : string.Empty | ||||||
|                     }; |                     }; | ||||||
| 
 | 
 | ||||||
|                     for (int i = 0; i < 7; i++) |                     for (int i = 0; i < 7; i++) | ||||||
|  | |||||||
| @ -108,6 +108,7 @@ namespace MediaBrowser.Api | |||||||
|             dto.CustomPrefs["skipForwardLength"] = displayPreferences.SkipForwardLength.ToString(); |             dto.CustomPrefs["skipForwardLength"] = displayPreferences.SkipForwardLength.ToString(); | ||||||
|             dto.CustomPrefs["skipBackLength"] = displayPreferences.SkipBackwardLength.ToString(); |             dto.CustomPrefs["skipBackLength"] = displayPreferences.SkipBackwardLength.ToString(); | ||||||
|             dto.CustomPrefs["enableNextVideoInfoOverlay"] = displayPreferences.EnableNextVideoInfoOverlay.ToString(); |             dto.CustomPrefs["enableNextVideoInfoOverlay"] = displayPreferences.EnableNextVideoInfoOverlay.ToString(); | ||||||
|  |             dto.CustomPrefs["tvhome"] = displayPreferences.TvHome; | ||||||
| 
 | 
 | ||||||
|             return ToOptimizedResult(dto); |             return ToOptimizedResult(dto); | ||||||
|         } |         } | ||||||
| @ -145,6 +146,7 @@ namespace MediaBrowser.Api | |||||||
|             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.DashboardTheme = request.CustomPrefs.TryGetValue("dashboardTheme", out var theme) ? theme : string.Empty; | ||||||
|  |             prefs.TvHome = request.CustomPrefs.TryGetValue("tvhome", out var home) ? home : 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"))) | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user