diff options
| author | BaronGreenback <jimcartlidge@yahoo.co.uk> | 2020-10-17 09:26:14 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-10-17 09:26:14 +0100 |
| commit | d42bb515ce3692abd9295008872c7f9d62b47652 (patch) | |
| tree | 53743242f3b34aeeb24334572e50d67dc9f92727 /MediaBrowser.Controller/Session/SessionInfo.cs | |
| parent | 75efb8f52d4234bfdefa2a0ac48f7261aa9ef58b (diff) | |
| parent | 86090ab1f65c66958c897cacd04221c537053eb3 (diff) | |
Merge branch 'master' into video-resolver
Diffstat (limited to 'MediaBrowser.Controller/Session/SessionInfo.cs')
| -rw-r--r-- | MediaBrowser.Controller/Session/SessionInfo.cs | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/MediaBrowser.Controller/Session/SessionInfo.cs b/MediaBrowser.Controller/Session/SessionInfo.cs index 2ba7c9fec0..ce58a60b9a 100644 --- a/MediaBrowser.Controller/Session/SessionInfo.cs +++ b/MediaBrowser.Controller/Session/SessionInfo.cs @@ -1,3 +1,5 @@ +#pragma warning disable CS1591 + using System; using System.Linq; using System.Text.Json.Serialization; @@ -20,7 +22,6 @@ namespace MediaBrowser.Controller.Session private readonly ISessionManager _sessionManager; private readonly ILogger _logger; - private readonly object _progressLock = new object(); private Timer _progressTimer; private PlaybackProgressInfo _lastProgressInfo; @@ -61,6 +62,7 @@ namespace MediaBrowser.Controller.Session { return Array.Empty<string>(); } + return Capabilities.PlayableMediaTypes; } } @@ -108,6 +110,12 @@ namespace MediaBrowser.Controller.Session public string DeviceName { get; set; } /// <summary> + /// Gets or sets the type of the device. + /// </summary> + /// <value>The type of the device.</value> + public string DeviceType { get; set; } + + /// <summary> /// Gets or sets the now playing item. /// </summary> /// <value>The now playing item.</value> @@ -154,6 +162,7 @@ namespace MediaBrowser.Controller.Session return true; } } + if (controllers.Length > 0) { return false; @@ -213,8 +222,17 @@ namespace MediaBrowser.Controller.Session public string PlaylistItemId { get; set; } + public string ServerId { get; set; } + public string UserPrimaryImageTag { get; set; } + /// <summary> + /// Gets or sets the supported commands. + /// </summary> + /// <value>The supported commands.</value> + public GeneralCommandType[] SupportedCommands + => Capabilities == null ? Array.Empty<GeneralCommandType>() : Capabilities.SupportedCommands; + public Tuple<ISessionController, bool> EnsureController<T>(Func<SessionInfo, ISessionController> factory) { var controllers = SessionControllers.ToList(); @@ -255,6 +273,7 @@ namespace MediaBrowser.Controller.Session return true; } } + return false; } @@ -292,6 +311,7 @@ namespace MediaBrowser.Controller.Session { return; } + if (progressInfo.IsPaused) { return; @@ -334,6 +354,7 @@ namespace MediaBrowser.Controller.Session _progressTimer.Dispose(); _progressTimer = null; } + _lastProgressInfo = null; } } |
