You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
jellyfin/MediaBrowser.Model/Dlna/SubtitleProfile.cs

63 lines
1.5 KiB

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