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.
63 lines
1.5 KiB
63 lines
1.5 KiB
#nullable disable
|
|
|
|
using System.Xml.Serialization;
|
|
using MediaBrowser.Model.Extensions;
|
|
|
|
namespace MediaBrowser.Model.Dlna;
|
|
|
|
/// <summary>
|
|
/// A class for subtitle profile information.
|
|
/// </summary>
|
|
public class SubtitleProfile
|
|
{
|
|
/// <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)
|
|
{
|
|
if (string.IsNullOrEmpty(Language))
|
|
{
|
|
return true;
|
|
}
|
|
|
|
if (string.IsNullOrEmpty(subLanguage))
|
|
{
|
|
subLanguage = "und";
|
|
}
|
|
|
|
return ContainerHelper.ContainsContainer(Language, subLanguage);
|
|
}
|
|
}
|