mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-27 04:24:52 +01:00
Fix builds
This commit is contained in:
@@ -15,6 +15,9 @@ using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace Jellyfin.Server.Implementations.Devices
|
||||
{
|
||||
/// <summary>
|
||||
/// Manages the creation, updating, and retrieval of devices.
|
||||
/// </summary>
|
||||
public class DeviceManager : IDeviceManager
|
||||
{
|
||||
private readonly JellyfinDbProvider _dbProvider;
|
||||
@@ -63,9 +66,9 @@ namespace Jellyfin.Server.Implementations.Devices
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public ClientCapabilities GetCapabilities(string id)
|
||||
public ClientCapabilities GetCapabilities(string deviceId)
|
||||
{
|
||||
return _capabilitiesMap.TryGetValue(id, out ClientCapabilities? result)
|
||||
return _capabilitiesMap.TryGetValue(deviceId, out ClientCapabilities? result)
|
||||
? result
|
||||
: new ClientCapabilities();
|
||||
}
|
||||
@@ -112,7 +115,7 @@ namespace Jellyfin.Server.Implementations.Devices
|
||||
sessions = sessions.Where(i => CanAccessDevice(user, i.DeviceId));
|
||||
}
|
||||
|
||||
var array = await sessions.Select(ToDeviceInfo).ToArrayAsync();
|
||||
var array = await sessions.Select(ToDeviceInfo).ToArrayAsync().ConfigureAwait(false);
|
||||
|
||||
return new QueryResult<DeviceInfo>(array);
|
||||
}
|
||||
|
||||
@@ -52,14 +52,15 @@ namespace Jellyfin.Server.Implementations.Security
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public async Task DeleteApiKey(Guid id)
|
||||
public async Task DeleteApiKey(Guid accessToken)
|
||||
{
|
||||
await using var dbContext = _dbProvider.CreateContext();
|
||||
|
||||
var key = await dbContext.ApiKeys
|
||||
.AsQueryable()
|
||||
.Where(apiKey => apiKey.AccessToken == id)
|
||||
.FirstOrDefaultAsync();
|
||||
.Where(apiKey => apiKey.AccessToken == accessToken)
|
||||
.FirstOrDefaultAsync()
|
||||
.ConfigureAwait(false);
|
||||
|
||||
if (key == null)
|
||||
{
|
||||
|
||||
@@ -295,7 +295,7 @@ namespace Jellyfin.Server.Implementations.Users
|
||||
}
|
||||
|
||||
user.EasyPassword = newPasswordSha1;
|
||||
await UpdateUserAsync(user);
|
||||
await UpdateUserAsync(user).ConfigureAwait(false);
|
||||
|
||||
_eventManager.Publish(new UserPasswordChangedEventArgs(user));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user