diff options
| author | Bond-009 <bond.009@outlook.com> | 2021-01-24 11:13:18 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-01-24 11:13:18 +0100 |
| commit | b4d04f9ca5345c87d44993fbbb9e211c1dbf2dcd (patch) | |
| tree | 67dadfd032cb417d185bb2f347b56ed5e850bc7f /Jellyfin.Api/Models/LiveTvDtos/GetProgramsDto.cs | |
| parent | 4aaf71b87383805df740703f4cf3714adf1f6dfd (diff) | |
| parent | 55670b91b26610655cd4c0528e3dd938b852b4fc (diff) | |
Merge pull request #5091 from crobibero/query-param-array
Use ArrayModelBinder for sortBy and sortOrder
Diffstat (limited to 'Jellyfin.Api/Models/LiveTvDtos/GetProgramsDto.cs')
| -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. |
