| | 1 | | #nullable disable |
| | 2 | |
|
| | 3 | | using System.Xml.Serialization; |
| | 4 | | using MediaBrowser.Model.Extensions; |
| | 5 | |
|
| | 6 | | namespace MediaBrowser.Model.Dlna; |
| | 7 | |
|
| | 8 | | /// <summary> |
| | 9 | | /// A class for subtitle profile information. |
| | 10 | | /// </summary> |
| | 11 | | public class SubtitleProfile |
| | 12 | | { |
| | 13 | | /// <summary> |
| | 14 | | /// Gets or sets the format. |
| | 15 | | /// </summary> |
| | 16 | | [XmlAttribute("format")] |
| | 17 | | public string Format { get; set; } |
| | 18 | |
|
| | 19 | | /// <summary> |
| | 20 | | /// Gets or sets the delivery method. |
| | 21 | | /// </summary> |
| | 22 | | [XmlAttribute("method")] |
| | 23 | | public SubtitleDeliveryMethod Method { get; set; } |
| | 24 | |
|
| | 25 | | /// <summary> |
| | 26 | | /// Gets or sets the DIDL mode. |
| | 27 | | /// </summary> |
| | 28 | | [XmlAttribute("didlMode")] |
| | 29 | | public string DidlMode { get; set; } |
| | 30 | |
|
| | 31 | | /// <summary> |
| | 32 | | /// Gets or sets the language. |
| | 33 | | /// </summary> |
| | 34 | | [XmlAttribute("language")] |
| | 35 | | public string Language { get; set; } |
| | 36 | |
|
| | 37 | | /// <summary> |
| | 38 | | /// Gets or sets the container. |
| | 39 | | /// </summary> |
| | 40 | | [XmlAttribute("container")] |
| | 41 | | public string Container { get; set; } |
| | 42 | |
|
| | 43 | | /// <summary> |
| | 44 | | /// Checks if a language is supported. |
| | 45 | | /// </summary> |
| | 46 | | /// <param name="subLanguage">The language to check for support.</param> |
| | 47 | | /// <returns><c>true</c> if supported.</returns> |
| | 48 | | public bool SupportsLanguage(string subLanguage) |
| | 49 | | { |
| 1382 | 50 | | if (string.IsNullOrEmpty(Language)) |
| | 51 | | { |
| 1382 | 52 | | return true; |
| | 53 | | } |
| | 54 | |
|
| 0 | 55 | | if (string.IsNullOrEmpty(subLanguage)) |
| | 56 | | { |
| 0 | 57 | | subLanguage = "und"; |
| | 58 | | } |
| | 59 | |
|
| 0 | 60 | | return ContainerHelper.ContainsContainer(Language, subLanguage); |
| | 61 | | } |
| | 62 | | } |