diff options
| author | crobibero <cody@robibe.ro> | 2020-11-11 08:08:06 -0700 |
|---|---|---|
| committer | crobibero <cody@robibe.ro> | 2020-11-11 08:08:06 -0700 |
| commit | 7ff212576e1fba5980163bcc1cd97c29aadc635f (patch) | |
| tree | 73b548bfedf984b83b2d8dc1f9b5406b1a9620de /Jellyfin.Api/Models | |
| parent | 380359b495f234450b21eafd2e64fa84b1bf2dcb (diff) | |
| parent | 5669d1dad23153401d1e648faa9b62b1d0e81838 (diff) | |
Merge remote-tracking branch 'upstream/master' into bye-tvdb
Diffstat (limited to 'Jellyfin.Api/Models')
| -rw-r--r-- | Jellyfin.Api/Models/LiveTvDtos/GetProgramsDto.cs | 13 | ||||
| -rw-r--r-- | Jellyfin.Api/Models/SubtitleDtos/UploadSubtitleDto.cs | 34 |
2 files changed, 45 insertions, 2 deletions
diff --git a/Jellyfin.Api/Models/LiveTvDtos/GetProgramsDto.cs b/Jellyfin.Api/Models/LiveTvDtos/GetProgramsDto.cs index d7eaab30d..aa9865192 100644 --- a/Jellyfin.Api/Models/LiveTvDtos/GetProgramsDto.cs +++ b/Jellyfin.Api/Models/LiveTvDtos/GetProgramsDto.cs @@ -1,4 +1,9 @@ using System; +using System.Diagnostics.CodeAnalysis; +using System.Text.Json.Serialization; +using MediaBrowser.Common.Json.Converters; +using MediaBrowser.Model.Entities; +using MediaBrowser.Model.Querying; namespace Jellyfin.Api.Models.LiveTvDtos { @@ -137,7 +142,9 @@ namespace Jellyfin.Api.Models.LiveTvDtos /// Gets or sets the image types to include in the output. /// Optional. /// </summary> - public string? EnableImageTypes { get; set; } + [JsonConverter(typeof(JsonCommaDelimitedArrayConverterFactory))] + [SuppressMessage("Microsoft.Performance", "CA1819:ReturnArrays", MessageId = "EnableImageTypes", Justification = "Imported from ServiceStack")] + public ImageType[] EnableImageTypes { get; set; } = Array.Empty<ImageType>(); /// <summary> /// Gets or sets include user data. @@ -161,6 +168,8 @@ namespace Jellyfin.Api.Models.LiveTvDtos /// Gets or sets 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. /// Optional. /// </summary> - public string? Fields { get; set; } + [JsonConverter(typeof(JsonCommaDelimitedArrayConverterFactory))] + [SuppressMessage("Microsoft.Performance", "CA1819:ReturnArrays", MessageId = "Fields", Justification = "Imported from ServiceStack")] + public ItemFields[] Fields { get; set; } = Array.Empty<ItemFields>(); } } diff --git a/Jellyfin.Api/Models/SubtitleDtos/UploadSubtitleDto.cs b/Jellyfin.Api/Models/SubtitleDtos/UploadSubtitleDto.cs new file mode 100644 index 000000000..30473255e --- /dev/null +++ b/Jellyfin.Api/Models/SubtitleDtos/UploadSubtitleDto.cs @@ -0,0 +1,34 @@ +using System.ComponentModel.DataAnnotations; + +namespace Jellyfin.Api.Models.SubtitleDtos +{ + /// <summary> + /// Upload subtitles dto. + /// </summary> + public class UploadSubtitleDto + { + /// <summary> + /// Gets or sets the subtitle language. + /// </summary> + [Required] + public string Language { get; set; } = string.Empty; + + /// <summary> + /// Gets or sets the subtitle format. + /// </summary> + [Required] + public string Format { get; set; } = string.Empty; + + /// <summary> + /// Gets or sets a value indicating whether the subtitle is forced. + /// </summary> + [Required] + public bool IsForced { get; set; } + + /// <summary> + /// Gets or sets the subtitle data. + /// </summary> + [Required] + public string Data { get; set; } = string.Empty; + } +}
\ No newline at end of file |
