2
0

DisplayPreferences.cs 3.6 KB

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