#pragma warning disable CA2227
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Jellyfin.Data.Enums;
namespace Jellyfin.Data.Entities
{
///
/// An entity representing a user's display preferences.
///
public class DisplayPreferences
{
///
/// Initializes a new instance of the class.
///
/// The user's id.
/// The client string.
public DisplayPreferences(Guid userId, string client)
{
UserId = userId;
Client = client;
ShowSidebar = false;
ShowBackdrop = true;
SkipForwardLength = 30000;
SkipBackwardLength = 10000;
ScrollDirection = ScrollDirection.Horizontal;
ChromecastVersion = ChromecastVersion.Stable;
DashboardTheme = string.Empty;
TvHome = string.Empty;
HomeSections = new HashSet();
}
///
/// Initializes a new instance of the class.
///
protected DisplayPreferences()
{
}
///
/// Gets or sets the Id.
///
///
/// Required.
///
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int Id { get; protected set; }
///
/// Gets or sets the user Id.
///
///
/// Required.
///
public Guid UserId { get; set; }
///
/// Gets or sets the client string.
///
///
/// Required. Max Length = 32.
///
[Required]
[MaxLength(32)]
[StringLength(32)]
public string Client { get; set; }
///
/// Gets or sets a value indicating whether to show the sidebar.
///
///
/// Required.
///
public bool ShowSidebar { get; set; }
///
/// Gets or sets a value indicating whether to show the backdrop.
///
///
/// Required.
///
public bool ShowBackdrop { get; set; }
///
/// Gets or sets the scroll direction.
///
///
/// Required.
///
public ScrollDirection ScrollDirection { get; set; }
///
/// Gets or sets what the view should be indexed by.
///
public IndexingKind? IndexBy { get; set; }
///
/// Gets or sets the length of time to skip forwards, in milliseconds.
///
///
/// Required.
///
public int SkipForwardLength { get; set; }
///
/// Gets or sets the length of time to skip backwards, in milliseconds.
///
///
/// Required.
///
public int SkipBackwardLength { get; set; }
///
/// Gets or sets the Chromecast Version.
///
///
/// Required.
///
public ChromecastVersion ChromecastVersion { get; set; }
///
/// Gets or sets a value indicating whether the next video info overlay should be shown.
///
///
/// Required.
///
public bool EnableNextVideoInfoOverlay { get; set; }
///
/// Gets or sets the dashboard theme.
///
[MaxLength(32)]
[StringLength(32)]
public string DashboardTheme { get; set; }
///
/// Gets or sets the tv home screen.
///
[MaxLength(32)]
[StringLength(32)]
public string TvHome { get; set; }
///
/// Gets or sets the home sections.
///
public virtual ICollection HomeSections { get; protected set; }
}
}