DisplayPreferences.cs 3.5 KB

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