aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Controllers/ArtistsController.cs
diff options
context:
space:
mode:
authorcrobibero <cody@robibe.ro>2021-04-28 18:33:30 -0600
committercrobibero <cody@robibe.ro>2021-04-28 18:33:30 -0600
commitd27ca993a5670d69bb40dd9879137c56eefe00e8 (patch)
treec449a5971856ae5aeb36d05c5b0fb89ed6def56f /Jellyfin.Api/Controllers/ArtistsController.cs
parentadfc03ac9dea134c57daefe8ca89fbfe089b9739 (diff)
Add ability to sort on Genre, MusicGenre, Artist
Diffstat (limited to 'Jellyfin.Api/Controllers/ArtistsController.cs')
-rw-r--r--Jellyfin.Api/Controllers/ArtistsController.cs7
1 files changed, 6 insertions, 1 deletions
diff --git a/Jellyfin.Api/Controllers/ArtistsController.cs b/Jellyfin.Api/Controllers/ArtistsController.cs
index 4b2e5e7ea..85d7c50d3 100644
--- a/Jellyfin.Api/Controllers/ArtistsController.cs
+++ b/Jellyfin.Api/Controllers/ArtistsController.cs
@@ -77,6 +77,8 @@ namespace Jellyfin.Api.Controllers
/// <param name="nameStartsWithOrGreater">Optional filter by items whose name is sorted equally or greater than a given input string.</param>
/// <param name="nameStartsWith">Optional filter by items whose name is sorted equally than a given input string.</param>
/// <param name="nameLessThan">Optional filter by items whose name is equally or lesser than a given input string.</param>
+ /// <param name="sortBy">Optional. Specify one or more sort orders, comma delimited.</param>
+ /// <param name="sortOrder">Sort Order - Ascending,Descending.</param>
/// <param name="enableImages">Optional, include image information in output.</param>
/// <param name="enableTotalRecordCount">Total record count.</param>
/// <response code="200">Artists returned.</response>
@@ -112,6 +114,8 @@ namespace Jellyfin.Api.Controllers
[FromQuery] string? nameStartsWithOrGreater,
[FromQuery] string? nameStartsWith,
[FromQuery] string? nameLessThan,
+ [FromQuery, ModelBinder(typeof(CommaDelimitedArrayModelBinder))] string[] sortBy,
+ [FromQuery, ModelBinder(typeof(CommaDelimitedArrayModelBinder))] SortOrder[] sortOrder,
[FromQuery] bool? enableImages = true,
[FromQuery] bool enableTotalRecordCount = true)
{
@@ -150,7 +154,8 @@ namespace Jellyfin.Api.Controllers
MinCommunityRating = minCommunityRating,
DtoOptions = dtoOptions,
SearchTerm = searchTerm,
- EnableTotalRecordCount = enableTotalRecordCount
+ EnableTotalRecordCount = enableTotalRecordCount,
+ OrderBy = RequestHelpers.GetOrderBy(sortBy, sortOrder)
};
if (parentId.HasValue)