aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Api/Session/SessionsService.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2017-10-22 02:22:43 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2017-10-22 02:22:43 -0400
commit7e5036a5875cb7f03ad728f970d66471ca30236b (patch)
tree31bb5509c42e490e1359483b7f047f63499317d6 /MediaBrowser.Api/Session/SessionsService.cs
parent7e2c52936ff15c2569a5cb6b3c5351c16c4163ff (diff)
update image aspect ratio detection
Diffstat (limited to 'MediaBrowser.Api/Session/SessionsService.cs')
-rw-r--r--MediaBrowser.Api/Session/SessionsService.cs17
1 files changed, 8 insertions, 9 deletions
diff --git a/MediaBrowser.Api/Session/SessionsService.cs b/MediaBrowser.Api/Session/SessionsService.cs
index 8f54b591e..e961f9d51 100644
--- a/MediaBrowser.Api/Session/SessionsService.cs
+++ b/MediaBrowser.Api/Session/SessionsService.cs
@@ -10,6 +10,7 @@ using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using MediaBrowser.Model.Services;
+using MediaBrowser.Controller;
namespace MediaBrowser.Api.Session
{
@@ -293,15 +294,9 @@ namespace MediaBrowser.Api.Session
private readonly IAuthenticationRepository _authRepo;
private readonly IDeviceManager _deviceManager;
private readonly ISessionContext _sessionContext;
+ private IServerApplicationHost _appHost;
- /// <summary>
- /// Initializes a new instance of the <see cref="SessionsService" /> class.
- /// </summary>
- /// <param name="sessionManager">The session manager.</param>
- /// <param name="userManager">The user manager.</param>
- /// <param name="authContext">The authentication context.</param>
- /// <param name="authRepo">The authentication repo.</param>
- public SessionsService(ISessionManager sessionManager, IUserManager userManager, IAuthorizationContext authContext, IAuthenticationRepository authRepo, IDeviceManager deviceManager, ISessionContext sessionContext)
+ public SessionsService(ISessionManager sessionManager, IServerApplicationHost appHost, IUserManager userManager, IAuthorizationContext authContext, IAuthenticationRepository authRepo, IDeviceManager deviceManager, ISessionContext sessionContext)
{
_sessionManager = sessionManager;
_userManager = userManager;
@@ -309,6 +304,7 @@ namespace MediaBrowser.Api.Session
_authRepo = authRepo;
_deviceManager = deviceManager;
_sessionContext = sessionContext;
+ _appHost = appHost;
}
public void Delete(RevokeKey request)
@@ -324,7 +320,10 @@ namespace MediaBrowser.Api.Session
AppName = request.App,
IsActive = true,
AccessToken = Guid.NewGuid().ToString("N"),
- DateCreated = DateTime.UtcNow
+ DateCreated = DateTime.UtcNow,
+ DeviceId = _appHost.SystemId,
+ DeviceName = _appHost.FriendlyName,
+ AppVersion = _appHost.ApplicationVersion.ToString()
}, CancellationToken.None);
}