aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Entities/Person.cs
diff options
context:
space:
mode:
authorCody Robibero <cody@robibe.ro>2025-08-11 21:03:55 -0600
committerCody Robibero <cody@robibe.ro>2025-08-11 21:06:04 -0600
commitbeca405ad4c771f9cfdd5b410b4a4ba9f1c2d6c8 (patch)
treebef93d4b121c21877663c8ae7373df601b0cfb9a /MediaBrowser.Controller/Entities/Person.cs
parent5eef85f027194491796ceb693057239858ac017c (diff)
Refactor to pull item counts in a single query
Diffstat (limited to 'MediaBrowser.Controller/Entities/Person.cs')
-rw-r--r--MediaBrowser.Controller/Entities/Person.cs38
1 files changed, 0 insertions, 38 deletions
diff --git a/MediaBrowser.Controller/Entities/Person.cs b/MediaBrowser.Controller/Entities/Person.cs
index d4158655b..5cc4d322f 100644
--- a/MediaBrowser.Controller/Entities/Person.cs
+++ b/MediaBrowser.Controller/Entities/Person.cs
@@ -5,7 +5,6 @@
using System;
using System.Collections.Generic;
using System.Text.Json.Serialization;
-using Jellyfin.Data.Enums;
using Jellyfin.Extensions;
using MediaBrowser.Controller.Providers;
using Microsoft.Extensions.Logging;
@@ -71,43 +70,6 @@ namespace MediaBrowser.Controller.Entities
return LibraryManager.GetItemList(query);
}
- public TaggedItemCounts GetTaggedItemCounts(InternalItemsQuery query)
- {
- query.PersonIds = [Id];
-
- var counts = new TaggedItemCounts();
-
- // TODO: Remove MusicAlbum and MusicArtist when the relationship between Persons and Music is removed
- query.IncludeItemTypes = [BaseItemKind.MusicAlbum];
- counts.AlbumCount = LibraryManager.GetCount(query);
-
- query.IncludeItemTypes = [BaseItemKind.MusicArtist];
- counts.ArtistCount = LibraryManager.GetCount(query);
-
- query.IncludeItemTypes = [BaseItemKind.Episode];
- counts.EpisodeCount = LibraryManager.GetCount(query);
-
- query.IncludeItemTypes = [BaseItemKind.Movie];
- counts.MovieCount = LibraryManager.GetCount(query);
-
- query.IncludeItemTypes = [BaseItemKind.MusicVideo];
- counts.MusicVideoCount = LibraryManager.GetCount(query);
-
- query.IncludeItemTypes = [BaseItemKind.LiveTvProgram];
- counts.ProgramCount = LibraryManager.GetCount(query);
-
- query.IncludeItemTypes = [BaseItemKind.Series];
- counts.SeriesCount = LibraryManager.GetCount(query);
-
- query.IncludeItemTypes = [BaseItemKind.Audio];
- counts.SongCount = LibraryManager.GetCount(query);
-
- query.IncludeItemTypes = [BaseItemKind.Trailer];
- counts.TrailerCount = LibraryManager.GetCount(query);
-
- return counts;
- }
-
public override bool CanDelete()
{
return false;