diff options
Diffstat (limited to 'MediaBrowser.Controller/Session')
| -rw-r--r-- | MediaBrowser.Controller/Session/ISessionController.cs | 10 | ||||
| -rw-r--r-- | MediaBrowser.Controller/Session/SessionInfo.cs | 13 |
2 files changed, 22 insertions, 1 deletions
diff --git a/MediaBrowser.Controller/Session/ISessionController.cs b/MediaBrowser.Controller/Session/ISessionController.cs index 1b50bad47d..d6dd7698e6 100644 --- a/MediaBrowser.Controller/Session/ISessionController.cs +++ b/MediaBrowser.Controller/Session/ISessionController.cs @@ -1,5 +1,6 @@ using MediaBrowser.Model.Entities; using MediaBrowser.Model.Session; +using MediaBrowser.Model.System; using System.Threading; using System.Threading.Tasks; @@ -14,6 +15,12 @@ namespace MediaBrowser.Controller.Session bool IsSessionActive { get; } /// <summary> + /// Gets a value indicating whether [supports media remote control]. + /// </summary> + /// <value><c>true</c> if [supports media remote control]; otherwise, <c>false</c>.</value> + bool SupportsMediaControl { get; } + + /// <summary> /// Sends the play command. /// </summary> /// <param name="command">The command.</param> @@ -48,9 +55,10 @@ namespace MediaBrowser.Controller.Session /// <summary> /// Sends the restart required message. /// </summary> + /// <param name="info">The information.</param> /// <param name="cancellationToken">The cancellation token.</param> /// <returns>Task.</returns> - Task SendRestartRequiredNotification(CancellationToken cancellationToken); + Task SendRestartRequiredNotification(SystemInfo info, CancellationToken cancellationToken); /// <summary> /// Sends the user data change info. diff --git a/MediaBrowser.Controller/Session/SessionInfo.cs b/MediaBrowser.Controller/Session/SessionInfo.cs index 9f5b687cc4..bc0f8a5d16 100644 --- a/MediaBrowser.Controller/Session/SessionInfo.cs +++ b/MediaBrowser.Controller/Session/SessionInfo.cs @@ -139,6 +139,19 @@ namespace MediaBrowser.Controller.Session } } + public bool SupportsMediaControl + { + get + { + if (SessionController != null) + { + return SessionController.SupportsMediaControl; + } + + return false; + } + } + public bool ContainsUser(Guid userId) { return (UserId ?? Guid.Empty) == UserId || AdditionalUsers.Any(i => userId == new Guid(i.UserId)); |
