Refactor to pull item counts in a single query

This commit is contained in:
Cody Robibero
2025-08-11 21:03:55 -06:00
parent 5eef85f027
commit beca405ad4
14 changed files with 207 additions and 233 deletions

View File

@@ -76,5 +76,14 @@ namespace MediaBrowser.Model.Dto
/// </summary>
/// <value>The item count.</value>
public int ItemCount { get; set; }
/// <summary>
/// Adds all counts.
/// </summary>
/// <returns>The total of the counts.</returns>
public int TotalItemCount()
{
return MovieCount + SeriesCount + EpisodeCount + ArtistCount + ProgramCount + TrailerCount + SongCount + AlbumCount + MusicVideoCount + BoxSetCount + BookCount;
}
}
}