aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Server.Implementations
diff options
context:
space:
mode:
authorTim Eisele <Ghost_of_Stone@web.de>2025-04-10 02:40:16 +0200
committerGitHub <noreply@github.com>2025-04-09 18:40:16 -0600
commitcad8de97018d88ea59c4a5900d0bff9bba73212c (patch)
treeab94933288b5bd32d12c99d8585299e1cb60ff82 /Jellyfin.Server.Implementations
parent294b2f90d10ad8cb6c2cbb16727a70b60e5a4ee2 (diff)
Add Genre cleanup and fix cleanup filter queries (#13891)
Diffstat (limited to 'Jellyfin.Server.Implementations')
-rw-r--r--Jellyfin.Server.Implementations/Item/BaseItemRepository.cs10
1 files changed, 8 insertions, 2 deletions
diff --git a/Jellyfin.Server.Implementations/Item/BaseItemRepository.cs b/Jellyfin.Server.Implementations/Item/BaseItemRepository.cs
index 75334f427..a569aa09f 100644
--- a/Jellyfin.Server.Implementations/Item/BaseItemRepository.cs
+++ b/Jellyfin.Server.Implementations/Item/BaseItemRepository.cs
@@ -1962,13 +1962,19 @@ public sealed class BaseItemRepository
if (filter.IsDeadArtist.HasValue && filter.IsDeadArtist.Value)
{
baseQuery = baseQuery
- .Where(e => e.ItemValues!.Count(f => f.ItemValue.Type == ItemValueType.Artist || f.ItemValue.Type == ItemValueType.AlbumArtist) == 1);
+ .Where(e => !context.ItemValues.Where(f => _getAllArtistsValueTypes.Contains(f.Type)).Any(f => f.Value == e.Name));
}
if (filter.IsDeadStudio.HasValue && filter.IsDeadStudio.Value)
{
baseQuery = baseQuery
- .Where(e => e.ItemValues!.Count(f => f.ItemValue.Type == ItemValueType.Studios) == 1);
+ .Where(e => !context.ItemValues.Where(f => _getStudiosValueTypes.Contains(f.Type)).Any(f => f.Value == e.Name));
+ }
+
+ if (filter.IsDeadGenre.HasValue && filter.IsDeadGenre.Value)
+ {
+ baseQuery = baseQuery
+ .Where(e => !context.ItemValues.Where(f => _getGenreValueTypes.Contains(f.Type)).Any(f => f.Value == e.Name));
}
if (filter.IsDeadPerson.HasValue && filter.IsDeadPerson.Value)