aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Model/Session
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Model/Session')
-rw-r--r--MediaBrowser.Model/Session/BrowseRequest.cs1
-rw-r--r--MediaBrowser.Model/Session/ClientCapabilities.cs9
-rw-r--r--MediaBrowser.Model/Session/GeneralCommand.cs3
-rw-r--r--MediaBrowser.Model/Session/GeneralCommandType.cs7
-rw-r--r--MediaBrowser.Model/Session/MessageCommand.cs1
-rw-r--r--MediaBrowser.Model/Session/PlayRequest.cs12
-rw-r--r--MediaBrowser.Model/Session/PlaybackProgressInfo.cs6
-rw-r--r--MediaBrowser.Model/Session/PlaybackStopInfo.cs2
-rw-r--r--MediaBrowser.Model/Session/PlayerStateInfo.cs1
-rw-r--r--MediaBrowser.Model/Session/PlaystateRequest.cs2
-rw-r--r--MediaBrowser.Model/Session/SessionMessageType.cs50
-rw-r--r--MediaBrowser.Model/Session/SessionUserInfo.cs2
-rw-r--r--MediaBrowser.Model/Session/TranscodingInfo.cs13
-rw-r--r--MediaBrowser.Model/Session/UserDataChangeInfo.cs1
14 files changed, 98 insertions, 12 deletions
diff --git a/MediaBrowser.Model/Session/BrowseRequest.cs b/MediaBrowser.Model/Session/BrowseRequest.cs
index f485d680e..1c997d584 100644
--- a/MediaBrowser.Model/Session/BrowseRequest.cs
+++ b/MediaBrowser.Model/Session/BrowseRequest.cs
@@ -1,3 +1,4 @@
+#nullable disable
namespace MediaBrowser.Model.Session
{
/// <summary>
diff --git a/MediaBrowser.Model/Session/ClientCapabilities.cs b/MediaBrowser.Model/Session/ClientCapabilities.cs
index 5da4998e8..a85e6ff2a 100644
--- a/MediaBrowser.Model/Session/ClientCapabilities.cs
+++ b/MediaBrowser.Model/Session/ClientCapabilities.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using System;
@@ -9,24 +10,28 @@ namespace MediaBrowser.Model.Session
{
public string[] PlayableMediaTypes { get; set; }
- public string[] SupportedCommands { get; set; }
+ public GeneralCommandType[] SupportedCommands { get; set; }
public bool SupportsMediaControl { get; set; }
+
public bool SupportsContentUploading { get; set; }
+
public string MessageCallbackUrl { get; set; }
public bool SupportsPersistentIdentifier { get; set; }
+
public bool SupportsSync { get; set; }
public DeviceProfile DeviceProfile { get; set; }
public string AppStoreUrl { get; set; }
+
public string IconUrl { get; set; }
public ClientCapabilities()
{
PlayableMediaTypes = Array.Empty<string>();
- SupportedCommands = Array.Empty<string>();
+ SupportedCommands = Array.Empty<GeneralCommandType>();
SupportsPersistentIdentifier = true;
}
}
diff --git a/MediaBrowser.Model/Session/GeneralCommand.cs b/MediaBrowser.Model/Session/GeneralCommand.cs
index 980e1f88b..77bb6bcf7 100644
--- a/MediaBrowser.Model/Session/GeneralCommand.cs
+++ b/MediaBrowser.Model/Session/GeneralCommand.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using System;
@@ -7,7 +8,7 @@ namespace MediaBrowser.Model.Session
{
public class GeneralCommand
{
- public string Name { get; set; }
+ public GeneralCommandType Name { get; set; }
public Guid ControllingUserId { get; set; }
diff --git a/MediaBrowser.Model/Session/GeneralCommandType.cs b/MediaBrowser.Model/Session/GeneralCommandType.cs
index 5a9042d5f..c58fa9a6b 100644
--- a/MediaBrowser.Model/Session/GeneralCommandType.cs
+++ b/MediaBrowser.Model/Session/GeneralCommandType.cs
@@ -43,6 +43,11 @@ namespace MediaBrowser.Model.Session
Guide = 32,
ToggleStats = 33,
PlayMediaSource = 34,
- PlayTrailers = 35
+ PlayTrailers = 35,
+ SetShuffleQueue = 36,
+ PlayState = 37,
+ PlayNext = 38,
+ ToggleOsdMenu = 39,
+ Play = 40
}
}
diff --git a/MediaBrowser.Model/Session/MessageCommand.cs b/MediaBrowser.Model/Session/MessageCommand.cs
index 473a7bccc..09abfbb3f 100644
--- a/MediaBrowser.Model/Session/MessageCommand.cs
+++ b/MediaBrowser.Model/Session/MessageCommand.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
namespace MediaBrowser.Model.Session
diff --git a/MediaBrowser.Model/Session/PlayRequest.cs b/MediaBrowser.Model/Session/PlayRequest.cs
index bdb2b2439..6a66465a2 100644
--- a/MediaBrowser.Model/Session/PlayRequest.cs
+++ b/MediaBrowser.Model/Session/PlayRequest.cs
@@ -1,12 +1,12 @@
+#nullable disable
#pragma warning disable CS1591
using System;
-using MediaBrowser.Model.Services;
namespace MediaBrowser.Model.Session
{
/// <summary>
- /// Class PlayRequest
+ /// Class PlayRequest.
/// </summary>
public class PlayRequest
{
@@ -14,21 +14,18 @@ namespace MediaBrowser.Model.Session
/// Gets or sets the item ids.
/// </summary>
/// <value>The item ids.</value>
- [ApiMember(Name = "ItemIds", Description = "The ids of the items to play, comma delimited", IsRequired = true, DataType = "string", ParameterType = "query", Verb = "POST", AllowMultiple = true)]
public Guid[] ItemIds { get; set; }
/// <summary>
- /// Gets or sets the start position ticks that the first item should be played at
+ /// Gets or sets the start position ticks that the first item should be played at.
/// </summary>
/// <value>The start position ticks.</value>
- [ApiMember(Name = "StartPositionTicks", Description = "The starting position of the first item.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "POST")]
public long? StartPositionTicks { get; set; }
/// <summary>
/// Gets or sets the play command.
/// </summary>
/// <value>The play command.</value>
- [ApiMember(Name = "PlayCommand", Description = "The type of play command to issue (PlayNow, PlayNext, PlayLast). Clients who have not yet implemented play next and play last may play now.", IsRequired = true, DataType = "string", ParameterType = "query", Verb = "POST")]
public PlayCommand PlayCommand { get; set; }
/// <summary>
@@ -38,8 +35,11 @@ namespace MediaBrowser.Model.Session
public Guid ControllingUserId { get; set; }
public int? SubtitleStreamIndex { get; set; }
+
public int? AudioStreamIndex { get; set; }
+
public string MediaSourceId { get; set; }
+
public int? StartIndex { get; set; }
}
}
diff --git a/MediaBrowser.Model/Session/PlaybackProgressInfo.cs b/MediaBrowser.Model/Session/PlaybackProgressInfo.cs
index 5687ba84b..73dbe6a2d 100644
--- a/MediaBrowser.Model/Session/PlaybackProgressInfo.cs
+++ b/MediaBrowser.Model/Session/PlaybackProgressInfo.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using System;
@@ -87,16 +88,19 @@ namespace MediaBrowser.Model.Session
/// </summary>
/// <value>The play method.</value>
public PlayMethod PlayMethod { get; set; }
+
/// <summary>
/// Gets or sets the live stream identifier.
/// </summary>
/// <value>The live stream identifier.</value>
public string LiveStreamId { get; set; }
+
/// <summary>
/// Gets or sets the play session identifier.
/// </summary>
/// <value>The play session identifier.</value>
public string PlaySessionId { get; set; }
+
/// <summary>
/// Gets or sets the repeat mode.
/// </summary>
@@ -104,6 +108,7 @@ namespace MediaBrowser.Model.Session
public RepeatMode RepeatMode { get; set; }
public QueueItem[] NowPlayingQueue { get; set; }
+
public string PlaylistItemId { get; set; }
}
@@ -117,6 +122,7 @@ namespace MediaBrowser.Model.Session
public class QueueItem
{
public Guid Id { get; set; }
+
public string PlaylistItemId { get; set; }
}
}
diff --git a/MediaBrowser.Model/Session/PlaybackStopInfo.cs b/MediaBrowser.Model/Session/PlaybackStopInfo.cs
index f8cfacc20..aa29bb249 100644
--- a/MediaBrowser.Model/Session/PlaybackStopInfo.cs
+++ b/MediaBrowser.Model/Session/PlaybackStopInfo.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using System;
@@ -61,6 +62,7 @@ namespace MediaBrowser.Model.Session
public string NextMediaType { get; set; }
public string PlaylistItemId { get; set; }
+
public QueueItem[] NowPlayingQueue { get; set; }
}
}
diff --git a/MediaBrowser.Model/Session/PlayerStateInfo.cs b/MediaBrowser.Model/Session/PlayerStateInfo.cs
index 0f9956873..0f10605ea 100644
--- a/MediaBrowser.Model/Session/PlayerStateInfo.cs
+++ b/MediaBrowser.Model/Session/PlayerStateInfo.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
namespace MediaBrowser.Model.Session
diff --git a/MediaBrowser.Model/Session/PlaystateRequest.cs b/MediaBrowser.Model/Session/PlaystateRequest.cs
index 493a8063a..ba2c024b7 100644
--- a/MediaBrowser.Model/Session/PlaystateRequest.cs
+++ b/MediaBrowser.Model/Session/PlaystateRequest.cs
@@ -12,6 +12,6 @@ namespace MediaBrowser.Model.Session
/// Gets or sets the controlling user identifier.
/// </summary>
/// <value>The controlling user identifier.</value>
- public string ControllingUserId { get; set; }
+ public string? ControllingUserId { get; set; }
}
}
diff --git a/MediaBrowser.Model/Session/SessionMessageType.cs b/MediaBrowser.Model/Session/SessionMessageType.cs
new file mode 100644
index 000000000..23c41026d
--- /dev/null
+++ b/MediaBrowser.Model/Session/SessionMessageType.cs
@@ -0,0 +1,50 @@
+#pragma warning disable CS1591
+
+namespace MediaBrowser.Model.Session
+{
+ /// <summary>
+ /// The different kinds of messages that are used in the WebSocket api.
+ /// </summary>
+ public enum SessionMessageType
+ {
+ // Server -> Client
+ ForceKeepAlive,
+ GeneralCommand,
+ UserDataChanged,
+ Sessions,
+ Play,
+ SyncPlayCommand,
+ SyncPlayGroupUpdate,
+ PlayState,
+ RestartRequired,
+ ServerShuttingDown,
+ ServerRestarting,
+ LibraryChanged,
+ UserDeleted,
+ UserUpdated,
+ SeriesTimerCreated,
+ TimerCreated,
+ SeriesTimerCancelled,
+ TimerCancelled,
+ RefreshProgress,
+ ScheduledTaskEnded,
+ PackageInstallationCancelled,
+ PackageInstallationFailed,
+ PackageInstallationCompleted,
+ PackageInstalling,
+ PackageUninstalled,
+ ActivityLogEntry,
+ ScheduledTasksInfo,
+
+ // Client -> Server
+ ActivityLogEntryStart,
+ ActivityLogEntryStop,
+ SessionsStart,
+ SessionsStop,
+ ScheduledTasksInfoStart,
+ ScheduledTasksInfoStop,
+
+ // Shared
+ KeepAlive,
+ }
+}
diff --git a/MediaBrowser.Model/Session/SessionUserInfo.cs b/MediaBrowser.Model/Session/SessionUserInfo.cs
index 42a56b92b..4d6f35efc 100644
--- a/MediaBrowser.Model/Session/SessionUserInfo.cs
+++ b/MediaBrowser.Model/Session/SessionUserInfo.cs
@@ -1,3 +1,4 @@
+#nullable disable
using System;
namespace MediaBrowser.Model.Session
@@ -12,6 +13,7 @@ namespace MediaBrowser.Model.Session
/// </summary>
/// <value>The user identifier.</value>
public Guid UserId { get; set; }
+
/// <summary>
/// Gets or sets the name of the user.
/// </summary>
diff --git a/MediaBrowser.Model/Session/TranscodingInfo.cs b/MediaBrowser.Model/Session/TranscodingInfo.cs
index 8f4e688f0..e832c2f6f 100644
--- a/MediaBrowser.Model/Session/TranscodingInfo.cs
+++ b/MediaBrowser.Model/Session/TranscodingInfo.cs
@@ -1,28 +1,39 @@
+#nullable disable
#pragma warning disable CS1591
+using System;
+
namespace MediaBrowser.Model.Session
{
public class TranscodingInfo
{
public string AudioCodec { get; set; }
+
public string VideoCodec { get; set; }
+
public string Container { get; set; }
+
public bool IsVideoDirect { get; set; }
+
public bool IsAudioDirect { get; set; }
+
public int? Bitrate { get; set; }
public float? Framerate { get; set; }
+
public double? CompletionPercentage { get; set; }
public int? Width { get; set; }
+
public int? Height { get; set; }
+
public int? AudioChannels { get; set; }
public TranscodeReason[] TranscodeReasons { get; set; }
public TranscodingInfo()
{
- TranscodeReasons = new TranscodeReason[] { };
+ TranscodeReasons = Array.Empty<TranscodeReason>();
}
}
diff --git a/MediaBrowser.Model/Session/UserDataChangeInfo.cs b/MediaBrowser.Model/Session/UserDataChangeInfo.cs
index 0872eb4b1..0fd24edcc 100644
--- a/MediaBrowser.Model/Session/UserDataChangeInfo.cs
+++ b/MediaBrowser.Model/Session/UserDataChangeInfo.cs
@@ -1,3 +1,4 @@
+#nullable disable
using MediaBrowser.Model.Dto;
namespace MediaBrowser.Model.Session