From beca405ad4c771f9cfdd5b410b4a4ba9f1c2d6c8 Mon Sep 17 00:00:00 2001 From: Cody Robibero Date: Mon, 11 Aug 2025 21:03:55 -0600 Subject: Refactor to pull item counts in a single query --- MediaBrowser.Model/Dto/ItemCounts.cs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'MediaBrowser.Model') diff --git a/MediaBrowser.Model/Dto/ItemCounts.cs b/MediaBrowser.Model/Dto/ItemCounts.cs index 95f4a3d77..a15a0c82a 100644 --- a/MediaBrowser.Model/Dto/ItemCounts.cs +++ b/MediaBrowser.Model/Dto/ItemCounts.cs @@ -76,5 +76,14 @@ namespace MediaBrowser.Model.Dto /// /// The item count. public int ItemCount { get; set; } + + /// + /// Adds all counts. + /// + /// The total of the counts. + public int TotalItemCount() + { + return MovieCount + SeriesCount + EpisodeCount + ArtistCount + ProgramCount + TrailerCount + SongCount + AlbumCount + MusicVideoCount + BoxSetCount + BookCount; + } } } -- cgit v1.2.3