aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Api/Session/SessionsService.cs
diff options
context:
space:
mode:
authordkanada <dkanada@users.noreply.github.com>2020-02-02 00:07:46 +0900
committerdkanada <dkanada@users.noreply.github.com>2020-02-02 00:07:46 +0900
commit6341d986a95be928a85ecd81c08fefdc5c3ec3b6 (patch)
tree0a89d39ec434a8e9dc84b857d3c53fe3d46c1b2d /MediaBrowser.Api/Session/SessionsService.cs
parentb3811a9498fe06b68693f4a269de902cdd7eb2a2 (diff)
fix a few warnings
Diffstat (limited to 'MediaBrowser.Api/Session/SessionsService.cs')
-rw-r--r--MediaBrowser.Api/Session/SessionsService.cs10
1 files changed, 3 insertions, 7 deletions
diff --git a/MediaBrowser.Api/Session/SessionsService.cs b/MediaBrowser.Api/Session/SessionsService.cs
index 700861c55..8e53490ff 100644
--- a/MediaBrowser.Api/Session/SessionsService.cs
+++ b/MediaBrowser.Api/Session/SessionsService.cs
@@ -276,7 +276,7 @@ namespace MediaBrowser.Api.Session
public class SessionsService : BaseApiService
{
/// <summary>
- /// The _session manager.
+ /// The session manager.
/// </summary>
private readonly ISessionManager _sessionManager;
@@ -438,14 +438,12 @@ namespace MediaBrowser.Api.Session
public Task Post(SendSystemCommand request)
{
var name = request.Command;
-
if (Enum.TryParse(name, true, out GeneralCommandType commandType))
{
name = commandType.ToString();
}
var currentSession = GetSession(_sessionContext);
-
var command = new GeneralCommand
{
Name = name,
@@ -518,16 +516,13 @@ namespace MediaBrowser.Api.Session
{
request.Id = GetSession(_sessionContext).Id;
}
+
_sessionManager.ReportCapabilities(request.Id, new ClientCapabilities
{
PlayableMediaTypes = SplitValue(request.PlayableMediaTypes, ','),
-
SupportedCommands = SplitValue(request.SupportedCommands, ','),
-
SupportsMediaControl = request.SupportsMediaControl,
-
SupportsSync = request.SupportsSync,
-
SupportsPersistentIdentifier = request.SupportsPersistentIdentifier
});
}
@@ -538,6 +533,7 @@ namespace MediaBrowser.Api.Session
{
request.Id = GetSession(_sessionContext).Id;
}
+
_sessionManager.ReportCapabilities(request.Id, request);
}
}