aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Model/Entities
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Model/Entities')
-rw-r--r--MediaBrowser.Model/Entities/MediaStream.cs13
-rw-r--r--MediaBrowser.Model/Entities/MediaStreamType.cs7
-rw-r--r--MediaBrowser.Model/Entities/ProviderIdsExtensions.cs15
3 files changed, 22 insertions, 13 deletions
diff --git a/MediaBrowser.Model/Entities/MediaStream.cs b/MediaBrowser.Model/Entities/MediaStream.cs
index 90a60cf47..344ebaf80 100644
--- a/MediaBrowser.Model/Entities/MediaStream.cs
+++ b/MediaBrowser.Model/Entities/MediaStream.cs
@@ -221,6 +221,8 @@ namespace MediaBrowser.Model.Entities
public string LocalizedExternal { get; set; }
+ public string LocalizedHearingImpaired { get; set; }
+
public string DisplayTitle
{
get
@@ -345,6 +347,11 @@ namespace MediaBrowser.Model.Entities
attributes.Add(string.IsNullOrEmpty(LocalizedUndefined) ? "Und" : LocalizedUndefined);
}
+ if (IsHearingImpaired)
+ {
+ attributes.Add(string.IsNullOrEmpty(LocalizedHearingImpaired) ? "Hearing Impaired" : LocalizedHearingImpaired);
+ }
+
if (IsDefault)
{
attributes.Add(string.IsNullOrEmpty(LocalizedDefault) ? "Default" : LocalizedDefault);
@@ -454,6 +461,12 @@ namespace MediaBrowser.Model.Entities
public bool IsForced { get; set; }
/// <summary>
+ /// Gets or sets a value indicating whether this instance is for the hearing impaired.
+ /// </summary>
+ /// <value><c>true</c> if this instance is for the hearing impaired; otherwise, <c>false</c>.</value>
+ public bool IsHearingImpaired { get; set; }
+
+ /// <summary>
/// Gets or sets the height.
/// </summary>
/// <value>The height.</value>
diff --git a/MediaBrowser.Model/Entities/MediaStreamType.cs b/MediaBrowser.Model/Entities/MediaStreamType.cs
index e09aaf6d0..83751a6a7 100644
--- a/MediaBrowser.Model/Entities/MediaStreamType.cs
+++ b/MediaBrowser.Model/Entities/MediaStreamType.cs
@@ -23,6 +23,11 @@ namespace MediaBrowser.Model.Entities
/// <summary>
/// The embedded image.
/// </summary>
- EmbeddedImage
+ EmbeddedImage,
+
+ /// <summary>
+ /// The data.
+ /// </summary>
+ Data
}
}
diff --git a/MediaBrowser.Model/Entities/ProviderIdsExtensions.cs b/MediaBrowser.Model/Entities/ProviderIdsExtensions.cs
index 62a2f3ce8..d3b8400f3 100644
--- a/MediaBrowser.Model/Entities/ProviderIdsExtensions.cs
+++ b/MediaBrowser.Model/Entities/ProviderIdsExtensions.cs
@@ -28,10 +28,7 @@ namespace MediaBrowser.Model.Entities
/// <returns><c>true</c> if a provider id with the given name was found; otherwise <c>false</c>.</returns>
public static bool HasProviderId(this IHasProviderIds instance, string name)
{
- if (instance == null)
- {
- throw new ArgumentNullException(nameof(instance));
- }
+ ArgumentNullException.ThrowIfNull(instance);
return instance.TryGetProviderId(name, out _);
}
@@ -56,10 +53,7 @@ namespace MediaBrowser.Model.Entities
/// <returns><c>true</c> if a provider id with the given name was found; otherwise <c>false</c>.</returns>
public static bool TryGetProviderId(this IHasProviderIds instance, string name, [NotNullWhen(true)] out string? id)
{
- if (instance == null)
- {
- throw new ArgumentNullException(nameof(instance));
- }
+ ArgumentNullException.ThrowIfNull(instance);
if (instance.ProviderIds == null)
{
@@ -121,10 +115,7 @@ namespace MediaBrowser.Model.Entities
/// <param name="value">The value.</param>
public static void SetProviderId(this IHasProviderIds instance, string name, string? value)
{
- if (instance == null)
- {
- throw new ArgumentNullException(nameof(instance));
- }
+ ArgumentNullException.ThrowIfNull(instance);
// If it's null remove the key from the dictionary
if (string.IsNullOrEmpty(value))