diff options
Diffstat (limited to 'MediaBrowser.Model/Dto')
| -rw-r--r-- | MediaBrowser.Model/Dto/BaseItemDto.cs | 4 | ||||
| -rw-r--r-- | MediaBrowser.Model/Dto/BaseItemPerson.cs | 2 | ||||
| -rw-r--r-- | MediaBrowser.Model/Dto/MediaSourceInfo.cs | 4 | ||||
| -rw-r--r-- | MediaBrowser.Model/Dto/MetadataEditorInfo.cs | 70 |
4 files changed, 54 insertions, 26 deletions
diff --git a/MediaBrowser.Model/Dto/BaseItemDto.cs b/MediaBrowser.Model/Dto/BaseItemDto.cs index 7bfd8ca29..937409111 100644 --- a/MediaBrowser.Model/Dto/BaseItemDto.cs +++ b/MediaBrowser.Model/Dto/BaseItemDto.cs @@ -3,6 +3,7 @@ using System; using System.Collections.Generic; +using System.ComponentModel; using Jellyfin.Data.Enums; using Jellyfin.Database.Implementations.Entities; using MediaBrowser.Model.Drawing; @@ -550,7 +551,7 @@ namespace MediaBrowser.Model.Dto /// Gets or sets the parent primary image item identifier. /// </summary> /// <value>The parent primary image item identifier.</value> - public string ParentPrimaryImageItemId { get; set; } + public Guid? ParentPrimaryImageItemId { get; set; } /// <summary> /// Gets or sets the parent primary image tag. @@ -586,6 +587,7 @@ namespace MediaBrowser.Model.Dto /// Gets or sets the type of the media. /// </summary> /// <value>The type of the media.</value> + [DefaultValue(MediaType.Unknown)] public MediaType MediaType { get; set; } /// <summary> diff --git a/MediaBrowser.Model/Dto/BaseItemPerson.cs b/MediaBrowser.Model/Dto/BaseItemPerson.cs index d3bcf492d..80e2cfb08 100644 --- a/MediaBrowser.Model/Dto/BaseItemPerson.cs +++ b/MediaBrowser.Model/Dto/BaseItemPerson.cs @@ -1,6 +1,7 @@ #nullable disable using System; using System.Collections.Generic; +using System.ComponentModel; using System.Text.Json.Serialization; using Jellyfin.Data.Enums; using MediaBrowser.Model.Entities; @@ -34,6 +35,7 @@ namespace MediaBrowser.Model.Dto /// Gets or sets the type. /// </summary> /// <value>The type.</value> + [DefaultValue(PersonKind.Unknown)] public PersonKind Type { get; set; } /// <summary> diff --git a/MediaBrowser.Model/Dto/MediaSourceInfo.cs b/MediaBrowser.Model/Dto/MediaSourceInfo.cs index 66de18cfe..75ccdcf27 100644 --- a/MediaBrowser.Model/Dto/MediaSourceInfo.cs +++ b/MediaBrowser.Model/Dto/MediaSourceInfo.cs @@ -24,6 +24,7 @@ namespace MediaBrowser.Model.Dto SupportsDirectPlay = true; SupportsProbing = true; UseMostCompatibleTranscodingProfile = false; + DefaultAudioIndexSource = AudioIndexSource.None; } public MediaProtocol Protocol { get; set; } @@ -118,6 +119,9 @@ namespace MediaBrowser.Model.Dto [JsonIgnore] public TranscodeReason TranscodeReasons { get; set; } + [JsonIgnore] + public AudioIndexSource DefaultAudioIndexSource { get; set; } + public int? DefaultAudioStreamIndex { get; set; } public int? DefaultSubtitleStreamIndex { get; set; } diff --git a/MediaBrowser.Model/Dto/MetadataEditorInfo.cs b/MediaBrowser.Model/Dto/MetadataEditorInfo.cs index a3035bf61..2f3a5d117 100644 --- a/MediaBrowser.Model/Dto/MetadataEditorInfo.cs +++ b/MediaBrowser.Model/Dto/MetadataEditorInfo.cs @@ -1,35 +1,55 @@ -#pragma warning disable CS1591 - -using System; using System.Collections.Generic; using Jellyfin.Data.Enums; using MediaBrowser.Model.Entities; using MediaBrowser.Model.Globalization; using MediaBrowser.Model.Providers; -namespace MediaBrowser.Model.Dto +namespace MediaBrowser.Model.Dto; + +/// <summary> +/// A class representing metadata editor information. +/// </summary> +public class MetadataEditorInfo { - public class MetadataEditorInfo + /// <summary> + /// Initializes a new instance of the <see cref="MetadataEditorInfo"/> class. + /// </summary> + public MetadataEditorInfo() { - public MetadataEditorInfo() - { - ParentalRatingOptions = Array.Empty<ParentalRating>(); - Countries = Array.Empty<CountryInfo>(); - Cultures = Array.Empty<CultureDto>(); - ExternalIdInfos = Array.Empty<ExternalIdInfo>(); - ContentTypeOptions = Array.Empty<NameValuePair>(); - } - - public IReadOnlyList<ParentalRating> ParentalRatingOptions { get; set; } - - public IReadOnlyList<CountryInfo> Countries { get; set; } - - public IReadOnlyList<CultureDto> Cultures { get; set; } - - public IReadOnlyList<ExternalIdInfo> ExternalIdInfos { get; set; } - - public CollectionType? ContentType { get; set; } - - public IReadOnlyList<NameValuePair> ContentTypeOptions { get; set; } + ParentalRatingOptions = []; + Countries = []; + Cultures = []; + ExternalIdInfos = []; + ContentTypeOptions = []; } + + /// <summary> + /// Gets or sets the parental rating options. + /// </summary> + public IReadOnlyList<ParentalRating> ParentalRatingOptions { get; set; } + + /// <summary> + /// Gets or sets the countries. + /// </summary> + public IReadOnlyList<CountryInfo> Countries { get; set; } + + /// <summary> + /// Gets or sets the cultures. + /// </summary> + public IReadOnlyList<CultureDto> Cultures { get; set; } + + /// <summary> + /// Gets or sets the external id infos. + /// </summary> + public IReadOnlyList<ExternalIdInfo> ExternalIdInfos { get; set; } + + /// <summary> + /// Gets or sets the content type. + /// </summary> + public CollectionType? ContentType { get; set; } + + /// <summary> + /// Gets or sets the content type options. + /// </summary> + public IReadOnlyList<NameValuePair> ContentTypeOptions { get; set; } } |
