diff options
| author | BaronGreenback <jimcartlidge@yahoo.co.uk> | 2020-11-12 09:18:49 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-11-12 09:18:49 +0000 |
| commit | 27bb17ef9d0ba72cb8c6a0a6f306c4226f132ac3 (patch) | |
| tree | eb609e64b5bd00bf9a66201e85cb6d41de99c596 /Jellyfin.Api/Controllers/UserLibraryController.cs | |
| parent | 63be65dd919f1e628452c64f0fae7a7f035bce96 (diff) | |
| parent | df2cb7f99504325ae35fdead0929225a0a2625f8 (diff) | |
Merge branch 'master' into Comment1
Diffstat (limited to 'Jellyfin.Api/Controllers/UserLibraryController.cs')
| -rw-r--r-- | Jellyfin.Api/Controllers/UserLibraryController.cs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Jellyfin.Api/Controllers/UserLibraryController.cs b/Jellyfin.Api/Controllers/UserLibraryController.cs index 48262f062..cfd851129 100644 --- a/Jellyfin.Api/Controllers/UserLibraryController.cs +++ b/Jellyfin.Api/Controllers/UserLibraryController.cs @@ -7,6 +7,7 @@ using System.Threading.Tasks; using Jellyfin.Api.Constants; using Jellyfin.Api.Extensions; using Jellyfin.Api.Helpers; +using Jellyfin.Api.ModelBinders; using MediaBrowser.Common.Extensions; using MediaBrowser.Controller.Dto; using MediaBrowser.Controller.Entities; @@ -251,7 +252,7 @@ namespace Jellyfin.Api.Controllers /// </summary> /// <param name="userId">User id.</param> /// <param name="parentId">Specify this to localize the search to a specific item or folder. Omit to use the root.</param> - /// <param name="fields">Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimeted. Options: Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, SortName, Studios, Taglines.</param> + /// <param name="fields">Optional. Specify additional fields of information to return in the output.</param> /// <param name="includeItemTypes">Optional. If specified, results will be filtered based on item type. This allows multiple, comma delimeted.</param> /// <param name="isPlayed">Filter by items that are played, or not.</param> /// <param name="enableImages">Optional. include image information in output.</param> @@ -267,12 +268,12 @@ namespace Jellyfin.Api.Controllers public ActionResult<IEnumerable<BaseItemDto>> GetLatestMedia( [FromRoute, Required] Guid userId, [FromQuery] Guid? parentId, - [FromQuery] string? fields, + [FromQuery, ModelBinder(typeof(CommaDelimitedArrayModelBinder))] ItemFields[] fields, [FromQuery] string? includeItemTypes, [FromQuery] bool? isPlayed, [FromQuery] bool? enableImages, [FromQuery] int? imageTypeLimit, - [FromQuery] string? enableImageTypes, + [FromQuery, ModelBinder(typeof(CommaDelimitedArrayModelBinder))] ImageType[] enableImageTypes, [FromQuery] bool? enableUserData, [FromQuery] int limit = 20, [FromQuery] bool groupItems = true) @@ -287,8 +288,7 @@ namespace Jellyfin.Api.Controllers } } - var dtoOptions = new DtoOptions() - .AddItemFields(fields) + var dtoOptions = new DtoOptions { Fields = fields } .AddClientFields(Request) .AddAdditionalDtoOptions(enableImages, enableUserData, imageTypeLimit, enableImageTypes); |
