aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Model/SyncPlay/SendCommand.cs
diff options
context:
space:
mode:
authorJoshua M. Boniface <joshua@boniface.me>2020-12-04 20:22:30 -0500
committerGitHub <noreply@github.com>2020-12-04 20:22:30 -0500
commitbba01bf7b9f63e0e19c133bed201db29fa60a833 (patch)
treef5cad92410ed1809dff3feeb82be5df08f2a4705 /MediaBrowser.Model/SyncPlay/SendCommand.cs
parentb96d4ef0e8ffa8429c25c83739a9c392a12e9d82 (diff)
parentcc64ee483d6620319d148ad27dbd1e26d8195ea6 (diff)
Merge pull request #3194 from OancaAndrei/syncplay-enhanced
SyncPlay for TV series (and Music)
Diffstat (limited to 'MediaBrowser.Model/SyncPlay/SendCommand.cs')
-rw-r--r--MediaBrowser.Model/SyncPlay/SendCommand.cs45
1 files changed, 35 insertions, 10 deletions
diff --git a/MediaBrowser.Model/SyncPlay/SendCommand.cs b/MediaBrowser.Model/SyncPlay/SendCommand.cs
index 0f0be0152..73cb50876 100644
--- a/MediaBrowser.Model/SyncPlay/SendCommand.cs
+++ b/MediaBrowser.Model/SyncPlay/SendCommand.cs
@@ -1,4 +1,4 @@
-#nullable disable
+using System;
namespace MediaBrowser.Model.SyncPlay
{
@@ -8,33 +8,58 @@ namespace MediaBrowser.Model.SyncPlay
public class SendCommand
{
/// <summary>
- /// Gets or sets the group identifier.
+ /// Initializes a new instance of the <see cref="SendCommand"/> class.
+ /// </summary>
+ /// <param name="groupId">The group identifier.</param>
+ /// <param name="playlistItemId">The playlist identifier of the playing item.</param>
+ /// <param name="when">The UTC time when to execute the command.</param>
+ /// <param name="command">The command.</param>
+ /// <param name="positionTicks">The position ticks, for commands that require it.</param>
+ /// <param name="emittedAt">The UTC time when this command has been emitted.</param>
+ public SendCommand(Guid groupId, Guid playlistItemId, DateTime when, SendCommandType command, long? positionTicks, DateTime emittedAt)
+ {
+ GroupId = groupId;
+ PlaylistItemId = playlistItemId;
+ When = when;
+ Command = command;
+ PositionTicks = positionTicks;
+ EmittedAt = emittedAt;
+ }
+
+ /// <summary>
+ /// Gets the group identifier.
/// </summary>
/// <value>The group identifier.</value>
- public string GroupId { get; set; }
+ public Guid GroupId { get; }
+
+ /// <summary>
+ /// Gets the playlist identifier of the playing item.
+ /// </summary>
+ /// <value>The playlist identifier of the playing item.</value>
+ public Guid PlaylistItemId { get; }
/// <summary>
/// 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.
+ /// Gets the position ticks.
/// </summary>
/// <value>The position ticks.</value>
- public long? PositionTicks { get; set; }
+ public long? PositionTicks { get; }
/// <summary>
- /// Gets or sets the command.
+ /// Gets the command.
/// </summary>
/// <value>The command.</value>
- public SendCommandType Command { get; set; }
+ public SendCommandType Command { get; }
/// <summary>
- /// Gets or sets the UTC time when this command has been emitted.
+ /// Gets 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; }
}
}