mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-01 13:28:27 +01:00
Hide some property setters, init null values, update namespaces
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
#nullable disable
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace MediaBrowser.Model.SyncPlay
|
||||
@@ -9,6 +8,16 @@ namespace MediaBrowser.Model.SyncPlay
|
||||
/// </summary>
|
||||
public class GroupInfoDto
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="GroupInfoDto"/> class.
|
||||
/// </summary>
|
||||
public GroupInfoDto()
|
||||
{
|
||||
GroupId = string.Empty;
|
||||
GroupName = string.Empty;
|
||||
Participants = new List<string>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the group identifier.
|
||||
/// </summary>
|
||||
@@ -37,6 +46,6 @@ namespace MediaBrowser.Model.SyncPlay
|
||||
/// Gets or sets the date when this dto has been updated.
|
||||
/// </summary>
|
||||
/// <value>The date when this dto has been updated.</value>
|
||||
public string LastUpdatedAt { get; set; }
|
||||
public DateTime LastUpdatedAt { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
18
MediaBrowser.Model/SyncPlay/GroupQueueMode.cs
Normal file
18
MediaBrowser.Model/SyncPlay/GroupQueueMode.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
namespace MediaBrowser.Model.SyncPlay
|
||||
{
|
||||
/// <summary>
|
||||
/// Enum GroupQueueMode.
|
||||
/// </summary>
|
||||
public enum GroupQueueMode
|
||||
{
|
||||
/// <summary>
|
||||
/// Insert items at the end of the queue.
|
||||
/// </summary>
|
||||
Queue = 0,
|
||||
|
||||
/// <summary>
|
||||
/// Insert items after the currently playing item.
|
||||
/// </summary>
|
||||
QueueNext = 1
|
||||
}
|
||||
}
|
||||
@@ -8,26 +8,26 @@ namespace MediaBrowser.Model.SyncPlay
|
||||
/// <summary>
|
||||
/// A user is requesting to create a new group.
|
||||
/// </summary>
|
||||
NewGroup,
|
||||
NewGroup = 0,
|
||||
|
||||
/// <summary>
|
||||
/// A user is requesting to join a group.
|
||||
/// </summary>
|
||||
JoinGroup,
|
||||
JoinGroup = 1,
|
||||
|
||||
/// <summary>
|
||||
/// A user is requesting to leave a group.
|
||||
/// </summary>
|
||||
LeaveGroup,
|
||||
LeaveGroup = 2,
|
||||
|
||||
/// <summary>
|
||||
/// A user is requesting the list of available groups.
|
||||
/// </summary>
|
||||
ListGroups,
|
||||
ListGroups = 3,
|
||||
|
||||
/// <summary>
|
||||
/// A user is sending a playback command to a group.
|
||||
/// </summary>
|
||||
Playback
|
||||
Playback = 4
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,21 +8,21 @@ namespace MediaBrowser.Model.SyncPlay
|
||||
/// <summary>
|
||||
/// The group is in idle state. No media is playing.
|
||||
/// </summary>
|
||||
Idle,
|
||||
Idle = 0,
|
||||
|
||||
/// <summary>
|
||||
/// The group is in wating state. Playback is paused. Will start playing when users are ready.
|
||||
/// </summary>
|
||||
Waiting,
|
||||
Waiting = 1,
|
||||
|
||||
/// <summary>
|
||||
/// The group is in paused state. Playback is paused. Will resume on play command.
|
||||
/// </summary>
|
||||
Paused,
|
||||
Paused = 2,
|
||||
|
||||
/// <summary>
|
||||
/// The group is in playing state. Playback is advancing.
|
||||
/// </summary>
|
||||
Playing
|
||||
Playing = 3
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#nullable disable
|
||||
|
||||
namespace MediaBrowser.Model.SyncPlay
|
||||
{
|
||||
/// <summary>
|
||||
@@ -7,6 +5,14 @@ namespace MediaBrowser.Model.SyncPlay
|
||||
/// </summary>
|
||||
public class NewGroupRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="NewGroupRequest"/> class.
|
||||
/// </summary>
|
||||
public NewGroupRequest()
|
||||
{
|
||||
GroupName = string.Empty;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the group name.
|
||||
/// </summary>
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#nullable disable
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace MediaBrowser.Model.SyncPlay
|
||||
@@ -9,6 +8,14 @@ namespace MediaBrowser.Model.SyncPlay
|
||||
/// </summary>
|
||||
public class PlayQueueUpdate
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="PlayQueueUpdate"/> class.
|
||||
/// </summary>
|
||||
public PlayQueueUpdate()
|
||||
{
|
||||
Playlist = new List<QueueItem>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the request type that originated this update.
|
||||
/// </summary>
|
||||
@@ -19,7 +26,7 @@ namespace MediaBrowser.Model.SyncPlay
|
||||
/// Gets or sets the UTC time of the last change to the playing queue.
|
||||
/// </summary>
|
||||
/// <value>The UTC time of the last change to the playing queue.</value>
|
||||
public string LastUpdate { get; set; }
|
||||
public DateTime LastUpdate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the playlist.
|
||||
|
||||
@@ -26,12 +26,12 @@ namespace MediaBrowser.Model.SyncPlay
|
||||
MoveItem = 3,
|
||||
|
||||
/// <summary>
|
||||
/// A user is making changes to the queue.
|
||||
/// A user is adding items the queue.
|
||||
/// </summary>
|
||||
Queue = 4,
|
||||
|
||||
/// <summary>
|
||||
/// A user is making changes to the queue.
|
||||
/// A user is adding items to the queue, after the currently playing item.
|
||||
/// </summary>
|
||||
QueueNext = 5,
|
||||
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#nullable disable
|
||||
|
||||
using System;
|
||||
|
||||
namespace MediaBrowser.Model.SyncPlay
|
||||
@@ -10,15 +8,26 @@ namespace MediaBrowser.Model.SyncPlay
|
||||
public class QueueItem
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the item identifier.
|
||||
/// Initializes a new instance of the <see cref="QueueItem"/> class.
|
||||
/// </summary>
|
||||
/// <value>The item identifier.</value>
|
||||
public Guid ItemId { get; set; }
|
||||
/// <param name="itemId">The item identifier.</param>
|
||||
/// <param name="playlistItemId">The playlist identifier of the item.</param>
|
||||
public QueueItem(Guid itemId, string playlistItemId)
|
||||
{
|
||||
ItemId = itemId;
|
||||
PlaylistItemId = playlistItemId;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the playlist identifier of the item.
|
||||
/// Gets the item identifier.
|
||||
/// </summary>
|
||||
/// <value>The item identifier.</value>
|
||||
public Guid ItemId { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the playlist identifier of the item.
|
||||
/// </summary>
|
||||
/// <value>The playlist identifier of the item.</value>
|
||||
public string PlaylistItemId { get; set; }
|
||||
public string PlaylistItemId { get; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#nullable disable
|
||||
using System;
|
||||
|
||||
namespace MediaBrowser.Model.SyncPlay
|
||||
{
|
||||
@@ -7,6 +7,15 @@ namespace MediaBrowser.Model.SyncPlay
|
||||
/// </summary>
|
||||
public class SendCommand
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="SendCommand"/> class.
|
||||
/// </summary>
|
||||
public SendCommand()
|
||||
{
|
||||
GroupId = string.Empty;
|
||||
PlaylistItemId = string.Empty;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the group identifier.
|
||||
/// </summary>
|
||||
@@ -23,7 +32,7 @@ namespace MediaBrowser.Model.SyncPlay
|
||||
/// Gets or sets the UTC time when to execute the command.
|
||||
/// </summary>
|
||||
/// <value>The UTC time when to execute the command.</value>
|
||||
public string When { get; set; }
|
||||
public DateTime When { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the position ticks.
|
||||
@@ -41,6 +50,6 @@ namespace MediaBrowser.Model.SyncPlay
|
||||
/// Gets or sets the UTC time when this command has been emitted.
|
||||
/// </summary>
|
||||
/// <value>The UTC time when this command has been emitted.</value>
|
||||
public string EmittedAt { get; set; }
|
||||
public DateTime EmittedAt { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user