aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Api/Session
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Api/Session')
-rw-r--r--MediaBrowser.Api/Session/SessionInfoWebSocketListener.cs16
-rw-r--r--MediaBrowser.Api/Session/SessionsService.cs23
2 files changed, 15 insertions, 24 deletions
diff --git a/MediaBrowser.Api/Session/SessionInfoWebSocketListener.cs b/MediaBrowser.Api/Session/SessionInfoWebSocketListener.cs
index 533e7d3072..387ccad25e 100644
--- a/MediaBrowser.Api/Session/SessionInfoWebSocketListener.cs
+++ b/MediaBrowser.Api/Session/SessionInfoWebSocketListener.cs
@@ -1,13 +1,10 @@
-using MediaBrowser.Controller.Library;
-using MediaBrowser.Controller.Net;
-using MediaBrowser.Controller.Session;
-using Microsoft.Extensions.Logging;
-using MediaBrowser.Model.Session;
using System.Collections.Generic;
-using System.Linq;
using System.Threading;
-using MediaBrowser.Model.Threading;
using System.Threading.Tasks;
+using MediaBrowser.Controller.Library;
+using MediaBrowser.Controller.Net;
+using MediaBrowser.Controller.Session;
+using Microsoft.Extensions.Logging;
namespace MediaBrowser.Api.Session
{
@@ -20,10 +17,7 @@ namespace MediaBrowser.Api.Session
/// Gets the name.
/// </summary>
/// <value>The name.</value>
- protected override string Name
- {
- get { return "Sessions"; }
- }
+ protected override string Name => "Sessions";
/// <summary>
/// The _kernel
diff --git a/MediaBrowser.Api/Session/SessionsService.cs b/MediaBrowser.Api/Session/SessionsService.cs
index 1056b3c8bd..c9a11c1172 100644
--- a/MediaBrowser.Api/Session/SessionsService.cs
+++ b/MediaBrowser.Api/Session/SessionsService.cs
@@ -1,17 +1,16 @@
-using MediaBrowser.Controller.Devices;
-using MediaBrowser.Controller.Library;
-using MediaBrowser.Controller.Net;
-using MediaBrowser.Controller.Security;
-using MediaBrowser.Controller.Session;
-using MediaBrowser.Model.Session;
using System;
-using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
-using MediaBrowser.Model.Services;
using MediaBrowser.Controller;
+using MediaBrowser.Controller.Devices;
+using MediaBrowser.Controller.Library;
+using MediaBrowser.Controller.Net;
+using MediaBrowser.Controller.Security;
+using MediaBrowser.Controller.Session;
using MediaBrowser.Model.Dto;
+using MediaBrowser.Model.Services;
+using MediaBrowser.Model.Session;
namespace MediaBrowser.Api.Session
{
@@ -310,8 +309,7 @@ namespace MediaBrowser.Api.Session
DateCreated = DateTime.UtcNow,
DeviceId = _appHost.SystemId,
DeviceName = _appHost.FriendlyName,
- AppVersion = _appHost.ApplicationVersion.ToString()
-
+ AppVersion = _appHost.ApplicationVersion
});
}
@@ -414,10 +412,9 @@ namespace MediaBrowser.Api.Session
/// <param name="request">The request.</param>
public Task Post(SendSystemCommand request)
{
- GeneralCommandType commandType;
var name = request.Command;
- if (Enum.TryParse(name, true, out commandType))
+ if (Enum.TryParse(name, true, out GeneralCommandType commandType))
{
name = commandType.ToString();
}
@@ -519,4 +516,4 @@ namespace MediaBrowser.Api.Session
_sessionManager.ReportCapabilities(request.Id, request);
}
}
-} \ No newline at end of file
+}