#nullable disable using System.Xml.Serialization; using MediaBrowser.Model.Extensions; namespace MediaBrowser.Model.Dlna; /// /// A class for subtitle profile information. /// public class SubtitleProfile { /// /// Gets or sets the format. /// [XmlAttribute("format")] public string Format { get; set; } /// /// Gets or sets the delivery method. /// [XmlAttribute("method")] public SubtitleDeliveryMethod Method { get; set; } /// /// Gets or sets the DIDL mode. /// [XmlAttribute("didlMode")] public string DidlMode { get; set; } /// /// Gets or sets the language. /// [XmlAttribute("language")] public string Language { get; set; } /// /// Gets or sets the container. /// [XmlAttribute("container")] public string Container { get; set; } /// /// Checks if a language is supported. /// /// The language to check for support. /// true if supported. public bool SupportsLanguage(string subLanguage) { if (string.IsNullOrEmpty(Language)) { return true; } if (string.IsNullOrEmpty(subLanguage)) { subLanguage = "und"; } return ContainerHelper.ContainsContainer(Language, subLanguage); } }