DisplayPreferencesDto.cs 3.5 KB

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