diff options
| author | Cody Robibero <cody@robibe.ro> | 2025-08-11 21:03:55 -0600 |
|---|---|---|
| committer | Cody Robibero <cody@robibe.ro> | 2025-08-11 21:06:04 -0600 |
| commit | beca405ad4c771f9cfdd5b410b4a4ba9f1c2d6c8 (patch) | |
| tree | bef93d4b121c21877663c8ae7373df601b0cfb9a /MediaBrowser.Model/Dto/ItemCounts.cs | |
| parent | 5eef85f027194491796ceb693057239858ac017c (diff) | |
Refactor to pull item counts in a single query
Diffstat (limited to 'MediaBrowser.Model/Dto/ItemCounts.cs')
| -rw-r--r-- | MediaBrowser.Model/Dto/ItemCounts.cs | 9 |
1 files changed, 9 insertions, 0 deletions
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 /// </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; + } } } |
