diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-04-17 10:42:25 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-04-17 10:42:25 -0400 |
| commit | d59df69b5bd3a55099c356b2a34f3630ef9b8f00 (patch) | |
| tree | 362c413b20e0e0e6b60d46ff2c25992e3c88e8c9 /MediaBrowser.Api/UserLibrary/PersonsService.cs | |
| parent | a5e2778f62380a601d0052faa34dd2b12f83e533 (diff) | |
added count api methods for studios and genres
Diffstat (limited to 'MediaBrowser.Api/UserLibrary/PersonsService.cs')
| -rw-r--r-- | MediaBrowser.Api/UserLibrary/PersonsService.cs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/MediaBrowser.Api/UserLibrary/PersonsService.cs b/MediaBrowser.Api/UserLibrary/PersonsService.cs index 52e241318..93443db68 100644 --- a/MediaBrowser.Api/UserLibrary/PersonsService.cs +++ b/MediaBrowser.Api/UserLibrary/PersonsService.cs @@ -1,4 +1,5 @@ using MediaBrowser.Controller.Entities; +using MediaBrowser.Controller.Entities.Audio; using MediaBrowser.Controller.Entities.Movies; using MediaBrowser.Controller.Entities.TV; using MediaBrowser.Controller.Library; @@ -39,12 +40,14 @@ namespace MediaBrowser.Api.UserLibrary /// Gets or sets the user id. /// </summary> /// <value>The user id.</value> + [ApiMember(Name = "UserId", Description = "User Id", IsRequired = true, DataType = "string", ParameterType = "path", Verb = "GET")] public Guid UserId { get; set; } /// <summary> /// Gets or sets the name. /// </summary> /// <value>The name.</value> + [ApiMember(Name = "Name", Description = "The person name", IsRequired = true, DataType = "string", ParameterType = "path", Verb = "GET")] public string Name { get; set; } } @@ -91,12 +94,18 @@ namespace MediaBrowser.Api.UserLibrary { TotalCount = items.Count, + TrailerCount = items.OfType<Trailer>().Count(), + MovieCount = items.OfType<Movie>().Count(), SeriesCount = items.OfType<Series>().Count(), GameCount = items.OfType<BaseGame>().Count(), + SongCount = items.OfType<AudioCodecs>().Count(), + + AlbumCount = items.OfType<MusicAlbum>().Count(), + EpisodeGuestStarCount = items.OfType<Episode>().Count(i => i.People.Any(p => string.Equals(p.Name, request.Name, StringComparison.OrdinalIgnoreCase) && string.Equals(p.Type, PersonType.GuestStar))) }; |
