diff options
| author | crobibero <cody@robibe.ro> | 2021-01-23 17:32:13 -0700 |
|---|---|---|
| committer | crobibero <cody@robibe.ro> | 2021-01-23 17:32:13 -0700 |
| commit | 55670b91b26610655cd4c0528e3dd938b852b4fc (patch) | |
| tree | 67dadfd032cb417d185bb2f347b56ed5e850bc7f /Jellyfin.Api/Models | |
| parent | 4aaf71b87383805df740703f4cf3714adf1f6dfd (diff) | |
Use ArrayModelBinder for sortBy and sortOrder
Diffstat (limited to 'Jellyfin.Api/Models')
| -rw-r--r-- | Jellyfin.Api/Models/LiveTvDtos/GetProgramsDto.cs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Jellyfin.Api/Models/LiveTvDtos/GetProgramsDto.cs b/Jellyfin.Api/Models/LiveTvDtos/GetProgramsDto.cs index a47ae926c..588ce717c 100644 --- a/Jellyfin.Api/Models/LiveTvDtos/GetProgramsDto.cs +++ b/Jellyfin.Api/Models/LiveTvDtos/GetProgramsDto.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Text.Json.Serialization; +using Jellyfin.Data.Enums; using MediaBrowser.Common.Json.Converters; using MediaBrowser.Model.Entities; using MediaBrowser.Model.Querying; @@ -106,12 +107,14 @@ namespace Jellyfin.Api.Models.LiveTvDtos /// Gets or sets specify one or more sort orders, comma delimited. Options: Name, StartDate. /// Optional. /// </summary> - public string? SortBy { get; set; } + [JsonConverter(typeof(JsonCommaDelimitedArrayConverterFactory))] + public IReadOnlyList<string> SortBy { get; set; } = Array.Empty<string>(); /// <summary> /// Gets or sets sort Order - Ascending,Descending. /// </summary> - public string? SortOrder { get; set; } + [JsonConverter(typeof(JsonCommaDelimitedArrayConverterFactory))] + public IReadOnlyList<SortOrder> SortOrder { get; set; } = Array.Empty<SortOrder>(); /// <summary> /// Gets or sets the genres to return guide information for. |
