aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Api/UserLibrary/GenresService.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Api/UserLibrary/GenresService.cs')
-rw-r--r--MediaBrowser.Api/UserLibrary/GenresService.cs13
1 files changed, 5 insertions, 8 deletions
diff --git a/MediaBrowser.Api/UserLibrary/GenresService.cs b/MediaBrowser.Api/UserLibrary/GenresService.cs
index c8c45c1bb..db0b0fe61 100644
--- a/MediaBrowser.Api/UserLibrary/GenresService.cs
+++ b/MediaBrowser.Api/UserLibrary/GenresService.cs
@@ -16,8 +16,7 @@ namespace MediaBrowser.Api.UserLibrary
/// <summary>
/// Class GetGenres
/// </summary>
- [Route("/Genres", "GET")]
- [Api(Description = "Gets all genres from a given item, folder, or the entire library")]
+ [Route("/Genres", "GET", Summary = "Gets all genres from a given item, folder, or the entire library")]
public class GetGenres : GetItemsByName
{
}
@@ -25,8 +24,7 @@ namespace MediaBrowser.Api.UserLibrary
/// <summary>
/// Class GetGenre
/// </summary>
- [Route("/Genres/{Name}", "GET")]
- [Api(Description = "Gets a genre, by name")]
+ [Route("/Genres/{Name}", "GET", Summary = "Gets a genre, by name")]
public class GetGenre : IReturn<BaseItemDto>
{
/// <summary>
@@ -76,17 +74,16 @@ namespace MediaBrowser.Api.UserLibrary
{
var item = GetGenre(request.Name, LibraryManager);
- // Get everything
- var fields = Enum.GetNames(typeof(ItemFields)).Select(i => (ItemFields)Enum.Parse(typeof(ItemFields), i, true));
+ var dtoOptions = new DtoOptions();
if (request.UserId.HasValue)
{
var user = UserManager.GetUserById(request.UserId.Value);
- return DtoService.GetBaseItemDto(item, fields.ToList(), user);
+ return DtoService.GetBaseItemDto(item, dtoOptions, user);
}
- return DtoService.GetBaseItemDto(item, fields.ToList());
+ return DtoService.GetBaseItemDto(item, dtoOptions);
}
/// <summary>