SessionInfoDto.cs 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  1. using System;
  2. using System.Collections.Generic;
  3. using Jellyfin.Data.Enums;
  4. using MediaBrowser.Model.Session;
  5. namespace MediaBrowser.Model.Dto;
  6. /// <summary>
  7. /// Session info DTO.
  8. /// </summary>
  9. public class SessionInfoDto
  10. {
  11. /// <summary>
  12. /// Gets or sets the play state.
  13. /// </summary>
  14. /// <value>The play state.</value>
  15. public PlayerStateInfo? PlayState { get; set; }
  16. /// <summary>
  17. /// Gets or sets the additional users.
  18. /// </summary>
  19. /// <value>The additional users.</value>
  20. public IReadOnlyList<SessionUserInfo>? AdditionalUsers { get; set; }
  21. /// <summary>
  22. /// Gets or sets the client capabilities.
  23. /// </summary>
  24. /// <value>The client capabilities.</value>
  25. public ClientCapabilitiesDto? Capabilities { get; set; }
  26. /// <summary>
  27. /// Gets or sets the remote end point.
  28. /// </summary>
  29. /// <value>The remote end point.</value>
  30. public string? RemoteEndPoint { get; set; }
  31. /// <summary>
  32. /// Gets or sets the playable media types.
  33. /// </summary>
  34. /// <value>The playable media types.</value>
  35. public IReadOnlyList<MediaType> PlayableMediaTypes { get; set; } = [];
  36. /// <summary>
  37. /// Gets or sets the id.
  38. /// </summary>
  39. /// <value>The id.</value>
  40. public string? Id { get; set; }
  41. /// <summary>
  42. /// Gets or sets the user id.
  43. /// </summary>
  44. /// <value>The user id.</value>
  45. public Guid UserId { get; set; }
  46. /// <summary>
  47. /// Gets or sets the username.
  48. /// </summary>
  49. /// <value>The username.</value>
  50. public string? UserName { get; set; }
  51. /// <summary>
  52. /// Gets or sets the type of the client.
  53. /// </summary>
  54. /// <value>The type of the client.</value>
  55. public string? Client { get; set; }
  56. /// <summary>
  57. /// Gets or sets the last activity date.
  58. /// </summary>
  59. /// <value>The last activity date.</value>
  60. public DateTime LastActivityDate { get; set; }
  61. /// <summary>
  62. /// Gets or sets the last playback check in.
  63. /// </summary>
  64. /// <value>The last playback check in.</value>
  65. public DateTime LastPlaybackCheckIn { get; set; }
  66. /// <summary>
  67. /// Gets or sets the last paused date.
  68. /// </summary>
  69. /// <value>The last paused date.</value>
  70. public DateTime? LastPausedDate { get; set; }
  71. /// <summary>
  72. /// Gets or sets the name of the device.
  73. /// </summary>
  74. /// <value>The name of the device.</value>
  75. public string? DeviceName { get; set; }
  76. /// <summary>
  77. /// Gets or sets the type of the device.
  78. /// </summary>
  79. /// <value>The type of the device.</value>
  80. public string? DeviceType { get; set; }
  81. /// <summary>
  82. /// Gets or sets the now playing item.
  83. /// </summary>
  84. /// <value>The now playing item.</value>
  85. public BaseItemDto? NowPlayingItem { get; set; }
  86. /// <summary>
  87. /// Gets or sets the now viewing item.
  88. /// </summary>
  89. /// <value>The now viewing item.</value>
  90. public BaseItemDto? NowViewingItem { get; set; }
  91. /// <summary>
  92. /// Gets or sets the device id.
  93. /// </summary>
  94. /// <value>The device id.</value>
  95. public string? DeviceId { get; set; }
  96. /// <summary>
  97. /// Gets or sets the application version.
  98. /// </summary>
  99. /// <value>The application version.</value>
  100. public string? ApplicationVersion { get; set; }
  101. /// <summary>
  102. /// Gets or sets the transcoding info.
  103. /// </summary>
  104. /// <value>The transcoding info.</value>
  105. public TranscodingInfo? TranscodingInfo { get; set; }
  106. /// <summary>
  107. /// Gets or sets a value indicating whether this session is active.
  108. /// </summary>
  109. /// <value><c>true</c> if this session is active; otherwise, <c>false</c>.</value>
  110. public bool IsActive { get; set; }
  111. /// <summary>
  112. /// Gets or sets a value indicating whether the session supports media control.
  113. /// </summary>
  114. /// <value><c>true</c> if this session supports media control; otherwise, <c>false</c>.</value>
  115. public bool SupportsMediaControl { get; set; }
  116. /// <summary>
  117. /// Gets or sets a value indicating whether the session supports remote control.
  118. /// </summary>
  119. /// <value><c>true</c> if this session supports remote control; otherwise, <c>false</c>.</value>
  120. public bool SupportsRemoteControl { get; set; }
  121. /// <summary>
  122. /// Gets or sets the now playing queue.
  123. /// </summary>
  124. /// <value>The now playing queue.</value>
  125. public IReadOnlyList<QueueItem>? NowPlayingQueue { get; set; }
  126. /// <summary>
  127. /// Gets or sets the now playing queue full items.
  128. /// </summary>
  129. /// <value>The now playing queue full items.</value>
  130. public IReadOnlyList<BaseItemDto>? NowPlayingQueueFullItems { get; set; }
  131. /// <summary>
  132. /// Gets or sets a value indicating whether the session has a custom device name.
  133. /// </summary>
  134. /// <value><c>true</c> if this session has a custom device name; otherwise, <c>false</c>.</value>
  135. public bool HasCustomDeviceName { get; set; }
  136. /// <summary>
  137. /// Gets or sets the playlist item id.
  138. /// </summary>
  139. /// <value>The splaylist item id.</value>
  140. public string? PlaylistItemId { get; set; }
  141. /// <summary>
  142. /// Gets or sets the server id.
  143. /// </summary>
  144. /// <value>The server id.</value>
  145. public string? ServerId { get; set; }
  146. /// <summary>
  147. /// Gets or sets the user primary image tag.
  148. /// </summary>
  149. /// <value>The user primary image tag.</value>
  150. public string? UserPrimaryImageTag { get; set; }
  151. /// <summary>
  152. /// Gets or sets the supported commands.
  153. /// </summary>
  154. /// <value>The supported commands.</value>
  155. public IReadOnlyList<GeneralCommandType> SupportedCommands { get; set; } = [];
  156. }