The Free Software Media System - Server Backend & API
add more data to item counts
Luke Pulverentie24d7676fed0
diff --git a/MediaBrowser.Api/LibraryService.cs b/MediaBrowser.Api/LibraryService.csindex c885a3981f..0f15124a5f 100644--- a/MediaBrowser.Api/LibraryService.cs+++ b/MediaBrowser.Api/LibraryService.cs@@ -320,13 +320,17 @@ namespace MediaBrowser.ApiAlbumCount = items.OfType<MusicAlbum>().Count(),EpisodeCount = items.OfType<Episode>().Count(),GameCount = items.OfType<Game>().Count(),+ GameSystemCount = items.OfType<GameSystem>().Count(),MovieCount = items.OfType<Movie>().Count(),SeriesCount = items.OfType<Series>().Count(),SongCount = items.OfType<Audio>().Count(),TrailerCount = items.OfType<Trailer>().Count(),MusicVideoCount = items.OfType<MusicVideo>().Count(),AdultVideoCount = items.OfType<AdultVideo>().Count(),- BoxSetCount = items.OfType<BoxSet>().Count()+ BoxSetCount = items.OfType<BoxSet>().Count(),+ BookCount = items.OfType<Book>().Count(),++ UniqueTypes = items.Select(i => i.GetType().Name).Distinct().ToList()};return ToOptimizedResult(counts);diff --git a/MediaBrowser.Model/Dto/ItemCounts.cs b/MediaBrowser.Model/Dto/ItemCounts.csindex f3295b2955..819a5ff4f7 100644--- a/MediaBrowser.Model/Dto/ItemCounts.cs+++ b/MediaBrowser.Model/Dto/ItemCounts.cs@@ -1,4 +1,6 @@+using System.Collections.Generic;+namespace MediaBrowser.Model.Dto{/// <summary>@@ -28,6 +30,11 @@ namespace MediaBrowser.Model.Dto/// <value>The game count.</value>public int GameCount { get; set; }/// <summary>+ /// Gets or sets the game system count.+ /// </summary>+ /// <value>The game system count.</value>+ public int GameSystemCount { get; set; }+ /// <summary>/// Gets or sets the trailer count./// </summary>/// <value>The trailer count.</value>@@ -47,6 +54,25 @@ namespace MediaBrowser.Model.Dto/// </summary>/// <value>The music video count.</value>public int MusicVideoCount { get; set; }+ /// <summary>+ /// Gets or sets the box set count.+ /// </summary>+ /// <value>The box set count.</value>public int BoxSetCount { get; set; }+ /// <summary>+ /// Gets or sets the book count.+ /// </summary>+ /// <value>The book count.</value>+ public int BookCount { get; set; }+ /// <summary>+ /// Gets or sets the unique types.+ /// </summary>+ /// <value>The unique types.</value>+ public List<string> UniqueTypes { get; set; }++ public ItemCounts()+ {+ UniqueTypes = new List<string>();+ }}}