aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Session
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Controller/Session')
-rw-r--r--MediaBrowser.Controller/Session/AuthenticationRequest.cs2
-rw-r--r--MediaBrowser.Controller/Session/ISessionManager.cs1
-rw-r--r--MediaBrowser.Controller/Session/SessionInfo.cs22
3 files changed, 11 insertions, 14 deletions
diff --git a/MediaBrowser.Controller/Session/AuthenticationRequest.cs b/MediaBrowser.Controller/Session/AuthenticationRequest.cs
index eb64db8c3..0489cf9b6 100644
--- a/MediaBrowser.Controller/Session/AuthenticationRequest.cs
+++ b/MediaBrowser.Controller/Session/AuthenticationRequest.cs
@@ -1,6 +1,5 @@
using System;
-
namespace MediaBrowser.Controller.Session
{
public class AuthenticationRequest
@@ -9,7 +8,6 @@ namespace MediaBrowser.Controller.Session
public Guid UserId { get; set; }
public string Password { get; set; }
public string PasswordSha1 { get; set; }
- public string PasswordMd5 { get; set; }
public string App { get; set; }
public string AppVersion { get; set; }
public string DeviceId { get; set; }
diff --git a/MediaBrowser.Controller/Session/ISessionManager.cs b/MediaBrowser.Controller/Session/ISessionManager.cs
index b7719e556..eca345cbc 100644
--- a/MediaBrowser.Controller/Session/ISessionManager.cs
+++ b/MediaBrowser.Controller/Session/ISessionManager.cs
@@ -5,7 +5,6 @@ using MediaBrowser.Controller.Security;
using MediaBrowser.Model.Dto;
using MediaBrowser.Model.Events;
using MediaBrowser.Model.Session;
-using MediaBrowser.Model.Users;
using System;
using System.Collections.Generic;
using System.Threading;
diff --git a/MediaBrowser.Controller/Session/SessionInfo.cs b/MediaBrowser.Controller/Session/SessionInfo.cs
index 869d3fcb0..77e786ead 100644
--- a/MediaBrowser.Controller/Session/SessionInfo.cs
+++ b/MediaBrowser.Controller/Session/SessionInfo.cs
@@ -1,11 +1,11 @@
-using MediaBrowser.Controller.Entities;
+using MediaBrowser.Controller.Entities;
using MediaBrowser.Model.Dto;
-using MediaBrowser.Model.Logging;
using MediaBrowser.Model.Serialization;
using MediaBrowser.Model.Session;
+using System;
+using Microsoft.Extensions.Logging;
using MediaBrowser.Model.Threading;
using System.Linq;
-using System;
namespace MediaBrowser.Controller.Session
{
@@ -22,9 +22,9 @@ namespace MediaBrowser.Controller.Session
_sessionManager = sessionManager;
_logger = logger;
- AdditionalUsers = new SessionUserInfo[] { };
+ AdditionalUsers = Array.Empty<SessionUserInfo>();
PlayState = new PlayerStateInfo();
- SessionControllers = new ISessionController[] { };
+ SessionControllers = Array.Empty<ISessionController>();
}
public PlayerStateInfo PlayState { get; set; }
@@ -49,7 +49,7 @@ namespace MediaBrowser.Controller.Session
{
if (Capabilities == null)
{
- return new string[] {};
+ return Array.Empty<string>();
}
return Capabilities.PlayableMediaTypes;
}
@@ -231,7 +231,7 @@ namespace MediaBrowser.Controller.Session
}
var newController = factory(this);
- _logger.Debug("Creating new {0}", newController.GetType().Name);
+ _logger.LogDebug("Creating new {0}", newController.GetType().Name);
controllers.Add(newController);
SessionControllers = controllers.ToArray();
@@ -337,7 +337,7 @@ namespace MediaBrowser.Controller.Session
}
catch (Exception ex)
{
- _logger.ErrorException("Error reporting playback progress", ex);
+ _logger.LogError(ex, "Error reporting playback progress");
}
}
@@ -363,7 +363,7 @@ namespace MediaBrowser.Controller.Session
StopAutomaticProgress();
var controllers = SessionControllers.ToList();
- SessionControllers = new ISessionController[] { };
+ SessionControllers = Array.Empty<ISessionController>();
foreach (var controller in controllers)
{
@@ -371,7 +371,7 @@ namespace MediaBrowser.Controller.Session
if (disposable != null)
{
- _logger.Debug("Disposing session controller {0}", disposable.GetType().Name);
+ _logger.LogDebug("Disposing session controller {0}", disposable.GetType().Name);
try
{
@@ -379,7 +379,7 @@ namespace MediaBrowser.Controller.Session
}
catch (Exception ex)
{
- _logger.ErrorException("Error disposing session controller", ex);
+ _logger.LogError(ex, "Error disposing session controller");
}
}
}