mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-05 07:18:47 +01:00
Make device/session code async
This commit is contained in:
@@ -50,6 +50,6 @@ namespace MediaBrowser.Controller.Devices
|
||||
|
||||
Task UpdateDeviceOptions(string deviceId, DeviceOptions options);
|
||||
|
||||
DeviceOptions GetDeviceOptions(string deviceId);
|
||||
Task<DeviceOptions> GetDeviceOptions(string deviceId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System.Threading.Tasks;
|
||||
using Jellyfin.Data.Entities;
|
||||
using MediaBrowser.Controller.Session;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
@@ -8,12 +9,12 @@ namespace MediaBrowser.Controller.Net
|
||||
{
|
||||
public interface ISessionContext
|
||||
{
|
||||
SessionInfo GetSession(object requestContext);
|
||||
Task<SessionInfo> GetSession(object requestContext);
|
||||
|
||||
User GetUser(object requestContext);
|
||||
Task<User> GetUser(object requestContext);
|
||||
|
||||
SessionInfo GetSession(HttpContext requestContext);
|
||||
Task<SessionInfo> GetSession(HttpContext requestContext);
|
||||
|
||||
User GetUser(HttpContext requestContext);
|
||||
Task<User> GetUser(HttpContext requestContext);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ namespace MediaBrowser.Controller.Session
|
||||
/// <param name="deviceName">Name of the device.</param>
|
||||
/// <param name="remoteEndPoint">The remote end point.</param>
|
||||
/// <param name="user">The user.</param>
|
||||
SessionInfo LogSessionActivity(string appName, string appVersion, string deviceId, string deviceName, string remoteEndPoint, Jellyfin.Data.Entities.User user);
|
||||
Task<SessionInfo> LogSessionActivity(string appName, string appVersion, string deviceId, string deviceName, string remoteEndPoint, Jellyfin.Data.Entities.User user);
|
||||
|
||||
/// <summary>
|
||||
/// Used to report that a session controller has connected.
|
||||
@@ -313,7 +313,7 @@ namespace MediaBrowser.Controller.Session
|
||||
/// <param name="deviceId">The device identifier.</param>
|
||||
/// <param name="remoteEndpoint">The remote endpoint.</param>
|
||||
/// <returns>SessionInfo.</returns>
|
||||
SessionInfo GetSessionByAuthenticationToken(string token, string deviceId, string remoteEndpoint);
|
||||
Task<SessionInfo> GetSessionByAuthenticationToken(string token, string deviceId, string remoteEndpoint);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the session by authentication token.
|
||||
@@ -323,7 +323,7 @@ namespace MediaBrowser.Controller.Session
|
||||
/// <param name="remoteEndpoint">The remote endpoint.</param>
|
||||
/// <param name="appVersion">The application version.</param>
|
||||
/// <returns>Task<SessionInfo>.</returns>
|
||||
SessionInfo GetSessionByAuthenticationToken(AuthenticationInfo info, string deviceId, string remoteEndpoint, string appVersion);
|
||||
Task<SessionInfo> GetSessionByAuthenticationToken(AuthenticationInfo info, string deviceId, string remoteEndpoint, string appVersion);
|
||||
|
||||
/// <summary>
|
||||
/// Logouts the specified access token.
|
||||
|
||||
Reference in New Issue
Block a user