From d716a53ec2433c6af43dfbce7f92fc9c2927592a Mon Sep 17 00:00:00 2001 From: JPVenson Date: Sat, 11 Jan 2025 18:13:16 +0000 Subject: [PATCH] Applied review comments --- .../Item/BaseItemRepository.cs | 18 +++--------------- .../Persistence/IItemRepository.cs | 2 +- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/Jellyfin.Server.Implementations/Item/BaseItemRepository.cs b/Jellyfin.Server.Implementations/Item/BaseItemRepository.cs index e087bd3287..01e23f56dc 100644 --- a/Jellyfin.Server.Implementations/Item/BaseItemRepository.cs +++ b/Jellyfin.Server.Implementations/Item/BaseItemRepository.cs @@ -41,8 +41,8 @@ using BaseItemEntity = Jellyfin.Data.Entities.BaseItemEntity; namespace Jellyfin.Server.Implementations.Item; /* - All queries in this class and all other nullable enabled EFCore repository classes will make libraral use of the null-forgiving operator "!". - This is done as the code isn't actually executed client side, but only the expressions are interpretet and the compiler cannot know that. + All queries in this class and all other nullable enabled EFCore repository classes will make liberal use of the null-forgiving operator "!". + This is done as the code isn't actually executed client side, but only the expressions are interpret and the compiler cannot know that. This is your only warning/message regarding this topic. */ @@ -50,7 +50,7 @@ namespace Jellyfin.Server.Implementations.Item; /// Handles all storage logic for BaseItems. /// public sealed class BaseItemRepository - : IItemRepository, IDisposable + : IItemRepository { /// /// This holds all the types in the running assemblies @@ -62,7 +62,6 @@ public sealed class BaseItemRepository private readonly IItemTypeLookup _itemTypeLookup; private readonly IServerConfigurationManager _serverConfigurationManager; private readonly ILogger _logger; - private bool _disposed; private static readonly IReadOnlyList _getAllArtistsValueTypes = [ItemValueType.Artist, ItemValueType.AlbumArtist]; private static readonly IReadOnlyList _getArtistValueTypes = [ItemValueType.Artist]; @@ -92,17 +91,6 @@ public sealed class BaseItemRepository _logger = logger; } - /// - public void Dispose() - { - if (_disposed) - { - return; - } - - _disposed = true; - } - /// public void DeleteItem(Guid id) { diff --git a/MediaBrowser.Controller/Persistence/IItemRepository.cs b/MediaBrowser.Controller/Persistence/IItemRepository.cs index b27f156efe..afe2d833d5 100644 --- a/MediaBrowser.Controller/Persistence/IItemRepository.cs +++ b/MediaBrowser.Controller/Persistence/IItemRepository.cs @@ -14,7 +14,7 @@ namespace MediaBrowser.Controller.Persistence; /// /// Provides an interface to implement an Item repository. /// -public interface IItemRepository : IDisposable +public interface IItemRepository { /// /// Deletes the item.