The Free Software Media System - Server Backend & API
Convert field string to enum.
crobibero69360b749a53
diff --git a/Jellyfin.Api/Controllers/ArtistsController.cs b/Jellyfin.Api/Controllers/ArtistsController.csindex d38214116c..e9e0160217 100644--- a/Jellyfin.Api/Controllers/ArtistsController.cs+++ b/Jellyfin.Api/Controllers/ArtistsController.cs@@ -51,7 +51,7 @@ namespace Jellyfin.Api.Controllers/// <param name="limit">Optional. The maximum number of records to return.</param>/// <param name="searchTerm">Optional. Search term.</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 delimited. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines.</param>+ /// <param name="fields">Optional. Specify additional fields of information to return in the output.</param>/// <param name="excludeItemTypes">Optional. If specified, results will be filtered out based on item type. This allows multiple, comma delimited.</param>/// <param name="includeItemTypes">Optional. If specified, results will be filtered based on item type. This allows multiple, comma delimited.</param>/// <param name="filters">Optional. Specify additional filters to apply. This allows multiple, comma delimited. Options: IsFolder, IsNotFolder, IsUnplayed, IsPlayed, IsFavorite, IsResumable, Likes, Dislikes.</param>@@ -86,7 +86,7 @@ namespace Jellyfin.Api.Controllers[FromQuery] int? limit,[FromQuery] string? searchTerm,[FromQuery] string? parentId,- [FromQuery] string? fields,+ [FromQuery] ItemFields[] fields,[FromQuery] string? excludeItemTypes,[FromQuery] string? includeItemTypes,[FromQuery] string? filters,@@ -260,7 +260,7 @@ namespace Jellyfin.Api.Controllers/// <param name="limit">Optional. The maximum number of records to return.</param>/// <param name="searchTerm">Optional. Search term.</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 delimited. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines.</param>+ /// <param name="fields">Optional. Specify additional fields of information to return in the output.</param>/// <param name="excludeItemTypes">Optional. If specified, results will be filtered out based on item type. This allows multiple, comma delimited.</param>/// <param name="includeItemTypes">Optional. If specified, results will be filtered based on item type. This allows multiple, comma delimited.</param>/// <param name="filters">Optional. Specify additional filters to apply. This allows multiple, comma delimited. Options: IsFolder, IsNotFolder, IsUnplayed, IsPlayed, IsFavorite, IsResumable, Likes, Dislikes.</param>@@ -295,7 +295,7 @@ namespace Jellyfin.Api.Controllers[FromQuery] int? limit,[FromQuery] string? searchTerm,[FromQuery] string? parentId,- [FromQuery] string? fields,+ [FromQuery] ItemFields[] fields,[FromQuery] string? excludeItemTypes,[FromQuery] string? includeItemTypes,[FromQuery] string? filters,diff --git a/Jellyfin.Api/Controllers/ChannelsController.cs b/Jellyfin.Api/Controllers/ChannelsController.csindex 33a969f859..732e24799a 100644--- a/Jellyfin.Api/Controllers/ChannelsController.cs+++ b/Jellyfin.Api/Controllers/ChannelsController.cs@@ -107,7 +107,7 @@ namespace Jellyfin.Api.Controllers/// <param name="sortOrder">Optional. Sort Order - Ascending,Descending.</param>/// <param name="filters">Optional. Specify additional filters to apply. This allows multiple, comma delimited. Options: IsFolder, IsNotFolder, IsUnplayed, IsPlayed, IsFavorite, IsResumable, Likes, Dislikes.</param>/// <param name="sortBy">Optional. Specify one or more sort orders, comma delimited. Options: Album, AlbumArtist, Artist, Budget, CommunityRating, CriticRating, DateCreated, DatePlayed, PlayCount, PremiereDate, ProductionYear, SortName, Random, Revenue, Runtime.</param>- /// <param name="fields">Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimited. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines.</param>+ /// <param name="fields">Optional. Specify additional fields of information to return in the output.</param>/// <response code="200">Channel items returned.</response>/// <returns>/// A <see cref="Task"/> representing the request to get the channel items.@@ -123,7 +123,7 @@ namespace Jellyfin.Api.Controllers[FromQuery] string? sortOrder,[FromQuery] string? filters,[FromQuery] string? sortBy,- [FromQuery] string? fields)+ [FromQuery] ItemFields[] fields){var user = userId.HasValue && !userId.Equals(Guid.Empty)? _userManager.GetUserById(userId.Value)@@ -184,7 +184,7 @@ namespace Jellyfin.Api.Controllers/// <param name="startIndex">Optional. The record index to start at. All items with a lower index will be dropped from the results.</param>/// <param name="limit">Optional. The maximum number of records to return.</param>/// <param name="filters">Optional. Specify additional filters to apply. This allows multiple, comma delimited. Options: IsFolder, IsNotFolder, IsUnplayed, IsPlayed, IsFavorite, IsResumable, Likes, Dislikes.</param>- /// <param name="fields">Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimited. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines.</param>+ /// <param name="fields">Optional. Specify additional fields of information to return in the output.</param>/// <param name="channelIds">Optional. Specify one or more channel id's, comma delimited.</param>/// <response code="200">Latest channel items returned.</response>/// <returns>@@ -197,7 +197,7 @@ namespace Jellyfin.Api.Controllers[FromQuery] int? startIndex,[FromQuery] int? limit,[FromQuery] string? filters,- [FromQuery] string? fields,+ [FromQuery] ItemFields[] fields,[FromQuery] string? channelIds){var user = userId.HasValue && !userId.Equals(Guid.Empty)diff --git a/Jellyfin.Api/Controllers/GenresController.cs b/Jellyfin.Api/Controllers/GenresController.csindex de6aa86c94..aad652a404 100644--- a/Jellyfin.Api/Controllers/GenresController.cs+++ b/Jellyfin.Api/Controllers/GenresController.cs@@ -52,7 +52,7 @@ namespace Jellyfin.Api.Controllers/// <param name="limit">Optional. The maximum number of records to return.</param>/// <param name="searchTerm">The search term.</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 delimited. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines.</param>+ /// <param name="fields">Optional. Specify additional fields of information to return in the output.</param>/// <param name="excludeItemTypes">Optional. If specified, results will be filtered out based on item type. This allows multiple, comma delimited.</param>/// <param name="includeItemTypes">Optional. If specified, results will be filtered in based on item type. This allows multiple, comma delimited.</param>/// <param name="filters">Optional. Specify additional filters to apply. This allows multiple, comma delimited. Options: IsFolder, IsNotFolder, IsUnplayed, IsPlayed, IsFavorite, IsResumable, Likes, Dislikes.</param>@@ -87,7 +87,7 @@ namespace Jellyfin.Api.Controllers[FromQuery] int? limit,[FromQuery] string? searchTerm,[FromQuery] string? parentId,- [FromQuery] string? fields,+ [FromQuery] ItemFields[] fields,[FromQuery] string? excludeItemTypes,[FromQuery] string? includeItemTypes,[FromQuery] string? filters,diff --git a/Jellyfin.Api/Controllers/InstantMixController.cs b/Jellyfin.Api/Controllers/InstantMixController.csindex 07fed97642..eae5ba843d 100644--- a/Jellyfin.Api/Controllers/InstantMixController.cs+++ b/Jellyfin.Api/Controllers/InstantMixController.cs@@ -54,7 +54,7 @@ namespace Jellyfin.Api.Controllers/// <param name="id">The item id.</param>/// <param name="userId">Optional. Filter by user id, and attach user data.</param>/// <param name="limit">Optional. The maximum number of records to return.</param>- /// <param name="fields">Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimeted. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines, TrailerUrls.</param>+ /// <param name="fields">Optional. Specify additional fields of information to return in the output.</param>/// <param name="enableImages">Optional. Include image information in output.</param>/// <param name="enableUserData">Optional. Include user data.</param>/// <param name="imageTypeLimit">Optional. The max number of images to return, per image type.</param>@@ -67,7 +67,7 @@ namespace Jellyfin.Api.Controllers[FromRoute, Required] Guid id,[FromQuery] Guid? userId,[FromQuery] int? limit,- [FromQuery] string? fields,+ [FromQuery] ItemFields[] fields,[FromQuery] bool? enableImages,[FromQuery] bool? enableUserData,[FromQuery] int? imageTypeLimit,@@ -91,7 +91,7 @@ namespace Jellyfin.Api.Controllers/// <param name="id">The item id.</param>/// <param name="userId">Optional. Filter by user id, and attach user data.</param>/// <param name="limit">Optional. The maximum number of records to return.</param>- /// <param name="fields">Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimeted. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines, TrailerUrls.</param>+ /// <param name="fields">Optional. Specify additional fields of information to return in the output.</param>/// <param name="enableImages">Optional. Include image information in output.</param>/// <param name="enableUserData">Optional. Include user data.</param>/// <param name="imageTypeLimit">Optional. The max number of images to return, per image type.</param>@@ -104,7 +104,7 @@ namespace Jellyfin.Api.Controllers[FromRoute, Required] Guid id,[FromQuery] Guid? userId,[FromQuery] int? limit,- [FromQuery] string? fields,+ [FromQuery] ItemFields[] fields,[FromQuery] bool? enableImages,[FromQuery] bool? enableUserData,[FromQuery] int? imageTypeLimit,@@ -128,7 +128,7 @@ namespace Jellyfin.Api.Controllers/// <param name="id">The item id.</param>/// <param name="userId">Optional. Filter by user id, and attach user data.</param>/// <param name="limit">Optional. The maximum number of records to return.</param>- /// <param name="fields">Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimeted. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines, TrailerUrls.</param>+ /// <param name="fields">Optional. Specify additional fields of information to return in the output.</param>/// <param name="enableImages">Optional. Include image information in output.</param>/// <param name="enableUserData">Optional. Include user data.</param>/// <param name="imageTypeLimit">Optional. The max number of images to return, per image type.</param>@@ -141,7 +141,7 @@ namespace Jellyfin.Api.Controllers[FromRoute, Required] Guid id,[FromQuery] Guid? userId,[FromQuery] int? limit,- [FromQuery] string? fields,+ [FromQuery] ItemFields[] fields,[FromQuery] bool? enableImages,[FromQuery] bool? enableUserData,[FromQuery] int? imageTypeLimit,@@ -165,7 +165,7 @@ namespace Jellyfin.Api.Controllers/// <param name="name">The genre name.</param>/// <param name="userId">Optional. Filter by user id, and attach user data.</param>/// <param name="limit">Optional. The maximum number of records to return.</param>- /// <param name="fields">Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimeted. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines, TrailerUrls.</param>+ /// <param name="fields">Optional. Specify additional fields of information to return in the output.</param>/// <param name="enableImages">Optional. Include image information in output.</param>/// <param name="enableUserData">Optional. Include user data.</param>/// <param name="imageTypeLimit">Optional. The max number of images to return, per image type.</param>@@ -178,7 +178,7 @@ namespace Jellyfin.Api.Controllers[FromRoute, Required] string name,[FromQuery] Guid? userId,[FromQuery] int? limit,- [FromQuery] string? fields,+ [FromQuery] ItemFields[] fields,[FromQuery] bool? enableImages,[FromQuery] bool? enableUserData,[FromQuery] int? imageTypeLimit,@@ -201,7 +201,7 @@ namespace Jellyfin.Api.Controllers/// <param name="id">The item id.</param>/// <param name="userId">Optional. Filter by user id, and attach user data.</param>/// <param name="limit">Optional. The maximum number of records to return.</param>- /// <param name="fields">Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimeted. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines, TrailerUrls.</param>+ /// <param name="fields">Optional. Specify additional fields of information to return in the output.</param>/// <param name="enableImages">Optional. Include image information in output.</param>/// <param name="enableUserData">Optional. Include user data.</param>/// <param name="imageTypeLimit">Optional. The max number of images to return, per image type.</param>@@ -214,7 +214,7 @@ namespace Jellyfin.Api.Controllers[FromRoute, Required] Guid id,[FromQuery] Guid? userId,[FromQuery] int? limit,- [FromQuery] string? fields,+ [FromQuery] ItemFields[] fields,[FromQuery] bool? enableImages,[FromQuery] bool? enableUserData,[FromQuery] int? imageTypeLimit,@@ -238,7 +238,7 @@ namespace Jellyfin.Api.Controllers/// <param name="id">The item id.</param>/// <param name="userId">Optional. Filter by user id, and attach user data.</param>/// <param name="limit">Optional. The maximum number of records to return.</param>- /// <param name="fields">Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimeted. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines, TrailerUrls.</param>+ /// <param name="fields">Optional. Specify additional fields of information to return in the output.</param>/// <param name="enableImages">Optional. Include image information in output.</param>/// <param name="enableUserData">Optional. Include user data.</param>/// <param name="imageTypeLimit">Optional. The max number of images to return, per image type.</param>@@ -251,7 +251,7 @@ namespace Jellyfin.Api.Controllers[FromRoute, Required] Guid id,[FromQuery] Guid? userId,[FromQuery] int? limit,- [FromQuery] string? fields,+ [FromQuery] ItemFields[] fields,[FromQuery] bool? enableImages,[FromQuery] bool? enableUserData,[FromQuery] int? imageTypeLimit,@@ -275,7 +275,7 @@ namespace Jellyfin.Api.Controllers/// <param name="id">The item id.</param>/// <param name="userId">Optional. Filter by user id, and attach user data.</param>/// <param name="limit">Optional. The maximum number of records to return.</param>- /// <param name="fields">Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimeted. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines, TrailerUrls.</param>+ /// <param name="fields">Optional. Specify additional fields of information to return in the output.</param>/// <param name="enableImages">Optional. Include image information in output.</param>/// <param name="enableUserData">Optional. Include user data.</param>/// <param name="imageTypeLimit">Optional. The max number of images to return, per image type.</param>@@ -288,7 +288,7 @@ namespace Jellyfin.Api.Controllers[FromRoute, Required] Guid id,[FromQuery] Guid? userId,[FromQuery] int? limit,- [FromQuery] string? fields,+ [FromQuery] ItemFields[] fields,[FromQuery] bool? enableImages,[FromQuery] bool? enableUserData,[FromQuery] int? imageTypeLimit,diff --git a/Jellyfin.Api/Controllers/ItemsController.cs b/Jellyfin.Api/Controllers/ItemsController.csindex 652c4689d0..5fd302db9e 100644--- a/Jellyfin.Api/Controllers/ItemsController.cs+++ b/Jellyfin.Api/Controllers/ItemsController.cs@@ -179,7 +179,7 @@ namespace Jellyfin.Api.Controllers[FromQuery] string? searchTerm,[FromQuery] string? sortOrder,[FromQuery] string? parentId,- [FromQuery] string? fields,+ [FromQuery] ItemFields[] fields,[FromQuery] string? excludeItemTypes,[FromQuery] string? includeItemTypes,[FromQuery] string? filters,@@ -535,7 +535,7 @@ namespace Jellyfin.Api.Controllers[FromQuery] int? limit,[FromQuery] string? searchTerm,[FromQuery] string? parentId,- [FromQuery] string? fields,+ [FromQuery] ItemFields[] fields,[FromQuery] string? mediaTypes,[FromQuery] bool? enableUserData,[FromQuery] int? imageTypeLimit,diff --git a/Jellyfin.Api/Controllers/LibraryController.cs b/Jellyfin.Api/Controllers/LibraryController.csindex 8a872ae133..865b0010d8 100644--- a/Jellyfin.Api/Controllers/LibraryController.cs+++ b/Jellyfin.Api/Controllers/LibraryController.cs@@ -693,7 +693,7 @@ namespace Jellyfin.Api.Controllers[FromQuery] string? excludeArtistIds,[FromQuery] Guid? userId,[FromQuery] int? limit,- [FromQuery] string? fields)+ [FromQuery] ItemFields[] fields){var item = itemId.Equals(Guid.Empty)? (!userId.Equals(Guid.Empty)@@ -885,7 +885,7 @@ namespace Jellyfin.Api.Controllersstring? excludeArtistIds,Guid? userId,int? limit,- string? fields,+ ItemFields[] fields,string[] includeItemTypes,bool isMovie){diff --git a/Jellyfin.Api/Controllers/LiveTvController.cs b/Jellyfin.Api/Controllers/LiveTvController.csindex 3557e63047..8c316cfbaf 100644--- a/Jellyfin.Api/Controllers/LiveTvController.cs+++ b/Jellyfin.Api/Controllers/LiveTvController.cs@@ -117,7 +117,7 @@ namespace Jellyfin.Api.Controllers/// <param name="enableImages">Optional. Include image information in output.</param>/// <param name="imageTypeLimit">Optional. The max number of images to return, per image type.</param>/// <param name="enableImageTypes">"Optional. The image types to include in the output.</param>- /// <param name="fields">Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimited. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines.</param>+ /// <param name="fields">Optional. Specify additional fields of information to return in the output.</param>/// <param name="enableUserData">Optional. Include user data.</param>/// <param name="sortBy">Optional. Key to sort by.</param>/// <param name="sortOrder">Optional. Sort order.</param>@@ -146,7 +146,7 @@ namespace Jellyfin.Api.Controllers[FromQuery] bool? enableImages,[FromQuery] int? imageTypeLimit,[FromQuery] string? enableImageTypes,- [FromQuery] string? fields,+ [FromQuery] ItemFields[] fields,[FromQuery] bool? enableUserData,[FromQuery] string? sortBy,[FromQuery] SortOrder? sortOrder,@@ -238,7 +238,7 @@ namespace Jellyfin.Api.Controllers/// <param name="enableImages">Optional. Include image information in output.</param>/// <param name="imageTypeLimit">Optional. The max number of images to return, per image type.</param>/// <param name="enableImageTypes">Optional. The image types to include in the output.</param>- /// <param name="fields">Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimited. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines.</param>+ /// <param name="fields">Optional. Specify additional fields of information to return in the output.</param>/// <param name="enableUserData">Optional. Include user data.</param>/// <param name="isMovie">Optional. Filter for movies.</param>/// <param name="isSeries">Optional. Filter for series.</param>@@ -263,7 +263,7 @@ namespace Jellyfin.Api.Controllers[FromQuery] bool? enableImages,[FromQuery] int? imageTypeLimit,[FromQuery] string? enableImageTypes,- [FromQuery] string? fields,+ [FromQuery] ItemFields[] fields,[FromQuery] bool? enableUserData,[FromQuery] bool? isMovie,[FromQuery] bool? isSeries,@@ -295,7 +295,7 @@ namespace Jellyfin.Api.ControllersIsKids = isKids,IsSports = isSports,IsLibraryItem = isLibraryItem,- Fields = RequestHelpers.GetItemFields(fields),+ Fields = fields,ImageTypeLimit = imageTypeLimit,EnableImages = enableImages}, dtoOptions);@@ -315,7 +315,7 @@ namespace Jellyfin.Api.Controllers/// <param name="enableImages">Optional. Include image information in output.</param>/// <param name="imageTypeLimit">Optional. The max number of images to return, per image type.</param>/// <param name="enableImageTypes">Optional. The image types to include in the output.</param>- /// <param name="fields">Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimited. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines.</param>+ /// <param name="fields">Optional. Specify additional fields of information to return in the output.</param>/// <param name="enableUserData">Optional. Include user data.</param>/// <param name="enableTotalRecordCount">Optional. Return total record count.</param>/// <response code="200">Live tv recordings returned.</response>@@ -350,7 +350,7 @@ namespace Jellyfin.Api.Controllers[FromQuery] bool? enableImages,[FromQuery] int? imageTypeLimit,[FromQuery] string? enableImageTypes,- [FromQuery] string? fields,+ [FromQuery] ItemFields[] fields,[FromQuery] bool? enableUserData,[FromQuery] bool enableTotalRecordCount = true){@@ -529,7 +529,7 @@ namespace Jellyfin.Api.Controllers/// <param name="enableUserData">Optional. Include user data.</param>/// <param name="seriesTimerId">Optional. Filter by series timer id.</param>/// <param name="librarySeriesId">Optional. Filter by library series id.</param>- /// <param name="fields">Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimited. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines.</param>+ /// <param name="fields">Optional. Specify additional fields of information to return in the output.</param>/// <param name="enableTotalRecordCount">Retrieve total record count.</param>/// <response code="200">Live tv epgs returned.</response>/// <returns>@@ -564,7 +564,7 @@ namespace Jellyfin.Api.Controllers[FromQuery] bool? enableUserData,[FromQuery] string? seriesTimerId,[FromQuery] Guid? librarySeriesId,- [FromQuery] string? fields,+ [FromQuery] ItemFields[] fields,[FromQuery] bool enableTotalRecordCount = true){var user = userId.HasValue && !userId.Equals(Guid.Empty)@@ -661,8 +661,9 @@ namespace Jellyfin.Api.Controllers}}+ var fields = RequestHelpers.GetItemFields(body.Fields);var dtoOptions = new DtoOptions()- .AddItemFields(body.Fields)+ .AddItemFields(fields).AddClientFields(Request).AddAdditionalDtoOptions(body.EnableImages, body.EnableUserData, body.ImageTypeLimit, body.EnableImageTypes);return await _liveTvManager.GetPrograms(query, dtoOptions, CancellationToken.None).ConfigureAwait(false);@@ -684,7 +685,7 @@ namespace Jellyfin.Api.Controllers/// <param name="imageTypeLimit">Optional. The max number of images to return, per image type.</param>/// <param name="enableImageTypes">Optional. The image types to include in the output.</param>/// <param name="genreIds">The genres to return guide information for.</param>- /// <param name="fields">Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimited. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines.</param>+ /// <param name="fields">Optional. Specify additional fields of information to return in the output.</param>/// <param name="enableUserData">Optional. include user data.</param>/// <param name="enableTotalRecordCount">Retrieve total record count.</param>/// <response code="200">Recommended epgs returned.</response>@@ -706,7 +707,7 @@ namespace Jellyfin.Api.Controllers[FromQuery] int? imageTypeLimit,[FromQuery] string? enableImageTypes,[FromQuery] string? genreIds,- [FromQuery] string? fields,+ [FromQuery] ItemFields[] fields,[FromQuery] bool? enableUserData,[FromQuery] bool enableTotalRecordCount = true){diff --git a/Jellyfin.Api/Controllers/MoviesController.cs b/Jellyfin.Api/Controllers/MoviesController.csindex 7fcfc749de..bf8279e0c7 100644--- a/Jellyfin.Api/Controllers/MoviesController.cs+++ b/Jellyfin.Api/Controllers/MoviesController.cs@@ -65,7 +65,7 @@ namespace Jellyfin.Api.Controllerspublic ActionResult<IEnumerable<RecommendationDto>> GetMovieRecommendations([FromQuery] Guid? userId,[FromQuery] string? parentId,- [FromQuery] string? fields,+ [FromQuery] ItemFields[] fields,[FromQuery] int categoryLimit = 5,[FromQuery] int itemLimit = 8){diff --git a/Jellyfin.Api/Controllers/MusicGenresController.cs b/Jellyfin.Api/Controllers/MusicGenresController.csindex 570ae8fdc7..bdcdf503eb 100644--- a/Jellyfin.Api/Controllers/MusicGenresController.cs+++ b/Jellyfin.Api/Controllers/MusicGenresController.cs@@ -52,7 +52,7 @@ namespace Jellyfin.Api.Controllers/// <param name="limit">Optional. The maximum number of records to return.</param>/// <param name="searchTerm">The search term.</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 delimited. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines.</param>+ /// <param name="fields">Optional. Specify additional fields of information to return in the output.</param>/// <param name="excludeItemTypes">Optional. If specified, results will be filtered out based on item type. This allows multiple, comma delimited.</param>/// <param name="includeItemTypes">Optional. If specified, results will be filtered in based on item type. This allows multiple, comma delimited.</param>/// <param name="filters">Optional. Specify additional filters to apply. This allows multiple, comma delimited. Options: IsFolder, IsNotFolder, IsUnplayed, IsPlayed, IsFavorite, IsResumable, Likes, Dislikes.</param>@@ -86,7 +86,7 @@ namespace Jellyfin.Api.Controllers[FromQuery] int? limit,[FromQuery] string? searchTerm,[FromQuery] string? parentId,- [FromQuery] string? fields,+ [FromQuery] ItemFields[] fields,[FromQuery] string? excludeItemTypes,[FromQuery] string? includeItemTypes,[FromQuery] string? filters,diff --git a/Jellyfin.Api/Controllers/PersonsController.cs b/Jellyfin.Api/Controllers/PersonsController.csindex 8bd610dad9..4b0a84df23 100644--- a/Jellyfin.Api/Controllers/PersonsController.cs+++ b/Jellyfin.Api/Controllers/PersonsController.cs@@ -51,7 +51,7 @@ namespace Jellyfin.Api.Controllers/// <param name="limit">Optional. The maximum number of records to return.</param>/// <param name="searchTerm">The search term.</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 delimited. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines.</param>+ /// <param name="fields">Optional. Specify additional fields of information to return in the output.</param>/// <param name="excludeItemTypes">Optional. If specified, results will be filtered out based on item type. This allows multiple, comma delimited.</param>/// <param name="includeItemTypes">Optional. If specified, results will be filtered in based on item type. This allows multiple, comma delimited.</param>/// <param name="filters">Optional. Specify additional filters to apply. This allows multiple, comma delimited. Options: IsFolder, IsNotFolder, IsUnplayed, IsPlayed, IsFavorite, IsResumable, Likes, Dislikes.</param>@@ -86,7 +86,7 @@ namespace Jellyfin.Api.Controllers[FromQuery] int? limit,[FromQuery] string? searchTerm,[FromQuery] string? parentId,- [FromQuery] string? fields,+ [FromQuery] ItemFields[] fields,[FromQuery] string? excludeItemTypes,[FromQuery] string? includeItemTypes,[FromQuery] string? filters,diff --git a/Jellyfin.Api/Controllers/PlaylistsController.cs b/Jellyfin.Api/Controllers/PlaylistsController.csindex 1e95bd2b38..31c66c3269 100644--- a/Jellyfin.Api/Controllers/PlaylistsController.cs+++ b/Jellyfin.Api/Controllers/PlaylistsController.cs@@ -133,7 +133,7 @@ namespace Jellyfin.Api.Controllers/// <param name="userId">User id.</param>/// <param name="startIndex">Optional. The record index to start at. All items with a lower index will be dropped from the results.</param>/// <param name="limit">Optional. The maximum number of records to return.</param>- /// <param name="fields">Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimited. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines.</param>+ /// <param name="fields">Optional. Specify additional fields of information to return in the output.</param>/// <param name="enableImages">Optional. Include image information in output.</param>/// <param name="enableUserData">Optional. Include user data.</param>/// <param name="imageTypeLimit">Optional. The max number of images to return, per image type.</param>@@ -147,7 +147,7 @@ namespace Jellyfin.Api.Controllers[FromQuery, Required] Guid userId,[FromQuery] int? startIndex,[FromQuery] int? limit,- [FromQuery] string? fields,+ [FromQuery] ItemFields[] fields,[FromQuery] bool? enableImages,[FromQuery] bool? enableUserData,[FromQuery] int? imageTypeLimit,diff --git a/Jellyfin.Api/Controllers/StudiosController.cs b/Jellyfin.Api/Controllers/StudiosController.csindex cdd5f958e9..886272c49a 100644--- a/Jellyfin.Api/Controllers/StudiosController.cs+++ b/Jellyfin.Api/Controllers/StudiosController.cs@@ -50,7 +50,7 @@ namespace Jellyfin.Api.Controllers/// <param name="limit">Optional. The maximum number of records to return.</param>/// <param name="searchTerm">Optional. Search term.</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 delimited. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines.</param>+ /// <param name="fields">Optional. Specify additional fields of information to return in the output.</param>/// <param name="excludeItemTypes">Optional. If specified, results will be filtered out based on item type. This allows multiple, comma delimited.</param>/// <param name="includeItemTypes">Optional. If specified, results will be filtered based on item type. This allows multiple, comma delimited.</param>/// <param name="filters">Optional. Specify additional filters to apply. This allows multiple, comma delimited. Options: IsFolder, IsNotFolder, IsUnplayed, IsPlayed, IsFavorite, IsResumable, Likes, Dislikes.</param>@@ -85,7 +85,7 @@ namespace Jellyfin.Api.Controllers[FromQuery] int? limit,[FromQuery] string? searchTerm,[FromQuery] string? parentId,- [FromQuery] string? fields,+ [FromQuery] ItemFields[] fields,[FromQuery] string? excludeItemTypes,[FromQuery] string? includeItemTypes,[FromQuery] string? filters,diff --git a/Jellyfin.Api/Controllers/TrailersController.cs b/Jellyfin.Api/Controllers/TrailersController.csindex 5157b08ae5..0662a39edc 100644--- a/Jellyfin.Api/Controllers/TrailersController.cs+++ b/Jellyfin.Api/Controllers/TrailersController.cs@@ -144,7 +144,7 @@ namespace Jellyfin.Api.Controllers[FromQuery] string? searchTerm,[FromQuery] string? sortOrder,[FromQuery] string? parentId,- [FromQuery] string? fields,+ [FromQuery] ItemFields[] fields,[FromQuery] string? excludeItemTypes,[FromQuery] string? filters,[FromQuery] bool? isFavorite,diff --git a/Jellyfin.Api/Controllers/TvShowsController.cs b/Jellyfin.Api/Controllers/TvShowsController.csindex d158f6c342..27e18eb38c 100644--- a/Jellyfin.Api/Controllers/TvShowsController.cs+++ b/Jellyfin.Api/Controllers/TvShowsController.cs@@ -57,7 +57,7 @@ namespace Jellyfin.Api.Controllers/// <param name="userId">The user id of the user to get the next up episodes for.</param>/// <param name="startIndex">Optional. The record index to start at. All items with a lower index will be dropped from the results.</param>/// <param name="limit">Optional. The maximum number of records to return.</param>- /// <param name="fields">Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimeted. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines, TrailerUrls.</param>+ /// <param name="fields">Optional. Specify additional fields of information to return in the output.</param>/// <param name="seriesId">Optional. Filter by series id.</param>/// <param name="parentId">Optional. Specify this to localize the search to a specific item or folder. Omit to use the root.</param>/// <param name="enableImges">Optional. Include image information in output.</param>@@ -72,7 +72,7 @@ namespace Jellyfin.Api.Controllers[FromQuery] Guid? userId,[FromQuery] int? startIndex,[FromQuery] int? limit,- [FromQuery] string? fields,+ [FromQuery] ItemFields[] fields,[FromQuery] string? seriesId,[FromQuery] string? parentId,[FromQuery] bool? enableImges,@@ -82,7 +82,7 @@ namespace Jellyfin.Api.Controllers[FromQuery] bool enableTotalRecordCount = true){var options = new DtoOptions()- .AddItemFields(fields!)+ .AddItemFields(fields).AddClientFields(Request).AddAdditionalDtoOptions(enableImges, enableUserData, imageTypeLimit, enableImageTypes!);@@ -117,7 +117,7 @@ namespace Jellyfin.Api.Controllers/// <param name="userId">The user id of the user to get the upcoming episodes for.</param>/// <param name="startIndex">Optional. The record index to start at. All items with a lower index will be dropped from the results.</param>/// <param name="limit">Optional. The maximum number of records to return.</param>- /// <param name="fields">Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimeted. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines, TrailerUrls.</param>+ /// <param name="fields">Optional. Specify additional fields of information to return in the output.</param>/// <param name="parentId">Optional. Specify this to localize the search to a specific item or folder. Omit to use the root.</param>/// <param name="enableImges">Optional. Include image information in output.</param>/// <param name="imageTypeLimit">Optional. The max number of images to return, per image type.</param>@@ -130,7 +130,7 @@ namespace Jellyfin.Api.Controllers[FromQuery] Guid? userId,[FromQuery] int? startIndex,[FromQuery] int? limit,- [FromQuery] string? fields,+ [FromQuery] ItemFields[] fields,[FromQuery] string? parentId,[FromQuery] bool? enableImges,[FromQuery] int? imageTypeLimit,@@ -196,7 +196,7 @@ namespace Jellyfin.Api.Controllerspublic ActionResult<QueryResult<BaseItemDto>> GetEpisodes([FromRoute, Required] string seriesId,[FromQuery] Guid? userId,- [FromQuery] string? fields,+ [FromQuery] ItemFields[] fields,[FromQuery] int? season,[FromQuery] string? seasonId,[FromQuery] bool? isMissing,@@ -319,7 +319,7 @@ namespace Jellyfin.Api.Controllerspublic ActionResult<QueryResult<BaseItemDto>> GetSeasons([FromRoute, Required] string seriesId,[FromQuery] Guid? userId,- [FromQuery] string? fields,+ [FromQuery] ItemFields[] fields,[FromQuery] bool? isSpecialSeason,[FromQuery] bool? isMissing,[FromQuery] string? adjacentTo,diff --git a/Jellyfin.Api/Controllers/UserLibraryController.cs b/Jellyfin.Api/Controllers/UserLibraryController.csindex 48262f0620..981c98b6aa 100644--- a/Jellyfin.Api/Controllers/UserLibraryController.cs+++ b/Jellyfin.Api/Controllers/UserLibraryController.cs@@ -251,7 +251,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,7 +267,7 @@ namespace Jellyfin.Api.Controllerspublic ActionResult<IEnumerable<BaseItemDto>> GetLatestMedia([FromRoute, Required] Guid userId,[FromQuery] Guid? parentId,- [FromQuery] string? fields,+ [FromQuery] ItemFields[] fields,[FromQuery] string? includeItemTypes,[FromQuery] bool? isPlayed,[FromQuery] bool? enableImages,diff --git a/Jellyfin.Api/Controllers/YearsController.cs b/Jellyfin.Api/Controllers/YearsController.csindex 4ecf0407bf..707a31f757 100644--- a/Jellyfin.Api/Controllers/YearsController.cs+++ b/Jellyfin.Api/Controllers/YearsController.cs@@ -50,7 +50,7 @@ namespace Jellyfin.Api.Controllers/// <param name="limit">Optional. The maximum number of records to return.</param>/// <param name="sortOrder">Sort Order - Ascending,Descending.</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 delimited. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines.</param>+ /// <param name="fields">Optional. Specify additional fields of information to return in the output.</param>/// <param name="excludeItemTypes">Optional. If specified, results will be excluded based on item type. This allows multiple, comma delimited.</param>/// <param name="includeItemTypes">Optional. If specified, results will be included based on item type. This allows multiple, comma delimited.</param>/// <param name="mediaTypes">Optional. Filter by MediaType. Allows multiple, comma delimited.</param>@@ -70,7 +70,7 @@ namespace Jellyfin.Api.Controllers[FromQuery] int? limit,[FromQuery] string? sortOrder,[FromQuery] string? parentId,- [FromQuery] string? fields,+ [FromQuery] ItemFields[] fields,[FromQuery] string? excludeItemTypes,[FromQuery] string? includeItemTypes,[FromQuery] string? mediaTypes,diff --git a/Jellyfin.Api/Extensions/DtoExtensions.cs b/Jellyfin.Api/Extensions/DtoExtensions.csindex e61e9c29d9..cbe748bcf4 100644--- a/Jellyfin.Api/Extensions/DtoExtensions.cs+++ b/Jellyfin.Api/Extensions/DtoExtensions.cs@@ -21,31 +21,11 @@ namespace Jellyfin.Api.Extensions/// Legacy order: 1./// </remarks>/// <param name="dtoOptions">DtoOptions object.</param>- /// <param name="fields">Comma delimited string of fields.</param>+ /// <param name="fields">Array of item fields.</param>/// <returns>Modified DtoOptions object.</returns>- internal static DtoOptions AddItemFields(this DtoOptions dtoOptions, string? fields)+ internal static DtoOptions AddItemFields(this DtoOptions dtoOptions, ItemFields[] fields){- if (string.IsNullOrEmpty(fields))- {- dtoOptions.Fields = Array.Empty<ItemFields>();- }- else- {- dtoOptions.Fields = fields.Split(',')- .Select(v =>- {- if (Enum.TryParse(v, true, out ItemFields value))- {- return (ItemFields?)value;- }-- return null;- })- .Where(i => i.HasValue)- .Select(i => i!.Value)- .ToArray();- }-+ dtoOptions.Fields = fields;return dtoOptions;}