DisplayPreferences.cs 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. #nullable disable
  2. using System.Collections.Generic;
  3. namespace MediaBrowser.Model.Entities
  4. {
  5. /// <summary>
  6. /// Defines the display preferences for any item that supports them (usually Folders).
  7. /// </summary>
  8. public class DisplayPreferences
  9. {
  10. /// <summary>
  11. /// The image scale.
  12. /// </summary>
  13. private const double ImageScale = .9;
  14. /// <summary>
  15. /// Initializes a new instance of the <see cref="DisplayPreferences" /> class.
  16. /// </summary>
  17. public DisplayPreferences()
  18. {
  19. RememberIndexing = false;
  20. PrimaryImageHeight = 250;
  21. PrimaryImageWidth = 250;
  22. ShowBackdrop = true;
  23. CustomPrefs = new Dictionary<string, string>();
  24. }
  25. /// <summary>
  26. /// Gets or sets the user id.
  27. /// </summary>
  28. /// <value>The user id.</value>
  29. public string Id { get; set; }
  30. /// <summary>
  31. /// Gets or sets the type of the view.
  32. /// </summary>
  33. /// <value>The type of the view.</value>
  34. public string ViewType { get; set; }
  35. /// <summary>
  36. /// Gets or sets the sort by.
  37. /// </summary>
  38. /// <value>The sort by.</value>
  39. public string SortBy { get; set; }
  40. /// <summary>
  41. /// Gets or sets the index by.
  42. /// </summary>
  43. /// <value>The index by.</value>
  44. public string IndexBy { get; set; }
  45. /// <summary>
  46. /// Gets or sets a value indicating whether [remember indexing].
  47. /// </summary>
  48. /// <value><c>true</c> if [remember indexing]; otherwise, <c>false</c>.</value>
  49. public bool RememberIndexing { get; set; }
  50. /// <summary>
  51. /// Gets or sets the height of the primary image.
  52. /// </summary>
  53. /// <value>The height of the primary image.</value>
  54. public int PrimaryImageHeight { get; set; }
  55. /// <summary>
  56. /// Gets or sets the width of the primary image.
  57. /// </summary>
  58. /// <value>The width of the primary image.</value>
  59. public int PrimaryImageWidth { get; set; }
  60. /// <summary>
  61. /// Gets or sets the custom prefs.
  62. /// </summary>
  63. /// <value>The custom prefs.</value>
  64. public Dictionary<string, string> CustomPrefs { get; set; }
  65. /// <summary>
  66. /// Gets or sets the scroll direction.
  67. /// </summary>
  68. /// <value>The scroll direction.</value>
  69. public ScrollDirection ScrollDirection { get; set; }
  70. /// <summary>
  71. /// Gets or sets a value indicating whether to show backdrops on this item.
  72. /// </summary>
  73. /// <value><c>true</c> if showing backdrops; otherwise, <c>false</c>.</value>
  74. public bool ShowBackdrop { get; set; }
  75. /// <summary>
  76. /// Gets or sets a value indicating whether [remember sorting].
  77. /// </summary>
  78. /// <value><c>true</c> if [remember sorting]; otherwise, <c>false</c>.</value>
  79. public bool RememberSorting { get; set; }
  80. /// <summary>
  81. /// Gets or sets the sort order.
  82. /// </summary>
  83. /// <value>The sort order.</value>
  84. public SortOrder SortOrder { get; set; }
  85. /// <summary>
  86. /// Gets or sets a value indicating whether [show sidebar].
  87. /// </summary>
  88. /// <value><c>true</c> if [show sidebar]; otherwise, <c>false</c>.</value>
  89. public bool ShowSidebar { get; set; }
  90. /// <summary>
  91. /// Gets or sets the client.
  92. /// </summary>
  93. public string Client { get; set; }
  94. }
  95. }