aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Server.Implementations/Users/DisplayPreferencesManager.cs
diff options
context:
space:
mode:
authorPithaya <19533412+Pithaya@users.noreply.github.com>2023-11-13 18:07:23 +0100
committerGitHub <noreply@github.com>2023-11-13 18:07:23 +0100
commiteb2bcc91c5e8182bddf1ab5d6ee2a951da66e9c6 (patch)
tree97bf08a7c3f3ebae72c0c89ffccd2917fad3cb2c /Jellyfin.Server.Implementations/Users/DisplayPreferencesManager.cs
parent948a67cfeb1aa045099c4486da4eb1fd459a676f (diff)
parentea546230586a00a75db5c379db904e47cbbf270b (diff)
Merge branch 'master' into feat/book-persons
Diffstat (limited to 'Jellyfin.Server.Implementations/Users/DisplayPreferencesManager.cs')
-rw-r--r--Jellyfin.Server.Implementations/Users/DisplayPreferencesManager.cs9
1 files changed, 8 insertions, 1 deletions
diff --git a/Jellyfin.Server.Implementations/Users/DisplayPreferencesManager.cs b/Jellyfin.Server.Implementations/Users/DisplayPreferencesManager.cs
index bfae81e4c..edc6aa173 100644
--- a/Jellyfin.Server.Implementations/Users/DisplayPreferencesManager.cs
+++ b/Jellyfin.Server.Implementations/Users/DisplayPreferencesManager.cs
@@ -4,6 +4,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
+using System.Threading.Tasks;
using Jellyfin.Data.Entities;
using MediaBrowser.Controller;
using Microsoft.EntityFrameworkCore;
@@ -13,7 +14,7 @@ namespace Jellyfin.Server.Implementations.Users
/// <summary>
/// Manages the storage and retrieval of display preferences through Entity Framework.
/// </summary>
- public class DisplayPreferencesManager : IDisplayPreferencesManager
+ public sealed class DisplayPreferencesManager : IDisplayPreferencesManager, IAsyncDisposable
{
private readonly JellyfinDbContext _dbContext;
@@ -97,5 +98,11 @@ namespace Jellyfin.Server.Implementations.Users
{
_dbContext.SaveChanges();
}
+
+ /// <inheritdoc />
+ public async ValueTask DisposeAsync()
+ {
+ await _dbContext.DisposeAsync().ConfigureAwait(false);
+ }
}
}