diff options
| author | Patrick Barron <barronpm@gmail.com> | 2021-07-13 19:30:11 -0400 |
|---|---|---|
| committer | Patrick Barron <barronpm@gmail.com> | 2021-07-13 19:30:11 -0400 |
| commit | 60ce0c9fa9a3df50a8a7a08629bcedbe3724aee3 (patch) | |
| tree | 2479e6066757e974ed806c5846e86eb13d973130 /Jellyfin.Server.Implementations/Devices | |
| parent | 06d682c29679d904bc1b21aa493bb9ed29bda265 (diff) | |
Add dto for device options
Diffstat (limited to 'Jellyfin.Server.Implementations/Devices')
| -rw-r--r-- | Jellyfin.Server.Implementations/Devices/DeviceManager.cs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Jellyfin.Server.Implementations/Devices/DeviceManager.cs b/Jellyfin.Server.Implementations/Devices/DeviceManager.cs index ef0d5db09..3d1bc30e8 100644 --- a/Jellyfin.Server.Implementations/Devices/DeviceManager.cs +++ b/Jellyfin.Server.Implementations/Devices/DeviceManager.cs @@ -46,7 +46,7 @@ namespace Jellyfin.Server.Implementations.Devices } /// <inheritdoc /> - public async Task UpdateDeviceOptions(string deviceId, DeviceOptions options) + public async Task UpdateDeviceOptions(string deviceId, string deviceName) { await using var dbContext = _dbProvider.CreateContext(); var deviceOptions = await dbContext.DeviceOptions.AsQueryable().FirstOrDefaultAsync(dev => dev.DeviceId == deviceId).ConfigureAwait(false); @@ -56,10 +56,10 @@ namespace Jellyfin.Server.Implementations.Devices dbContext.DeviceOptions.Add(deviceOptions); } - deviceOptions.CustomName = options.CustomName; + deviceOptions.CustomName = deviceName; await dbContext.SaveChangesAsync().ConfigureAwait(false); - DeviceOptionsUpdated?.Invoke(this, new GenericEventArgs<Tuple<string, DeviceOptions>>(new Tuple<string, DeviceOptions>(deviceId, options))); + DeviceOptionsUpdated?.Invoke(this, new GenericEventArgs<Tuple<string, DeviceOptions>>(new Tuple<string, DeviceOptions>(deviceId, deviceOptions))); } /// <inheritdoc /> |
