aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Model/Entities/MediaStream.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Model/Entities/MediaStream.cs')
-rw-r--r--MediaBrowser.Model/Entities/MediaStream.cs18
1 files changed, 17 insertions, 1 deletions
diff --git a/MediaBrowser.Model/Entities/MediaStream.cs b/MediaBrowser.Model/Entities/MediaStream.cs
index 66163c1ef..9f64b36e4 100644
--- a/MediaBrowser.Model/Entities/MediaStream.cs
+++ b/MediaBrowser.Model/Entities/MediaStream.cs
@@ -1,4 +1,6 @@
-using System.Diagnostics;
+using System;
+using System.Diagnostics;
+using System.Runtime.Serialization;
namespace MediaBrowser.Model.Entities
{
@@ -128,6 +130,20 @@ namespace MediaBrowser.Model.Entities
/// <value><c>true</c> if this instance is external; otherwise, <c>false</c>.</value>
public bool IsExternal { get; set; }
+ [IgnoreDataMember]
+ public bool IsGraphicalSubtitleStream
+ {
+ get
+ {
+ if (IsExternal) return false;
+
+ var codec = Codec ?? string.Empty;
+
+ return codec.IndexOf("pgs", StringComparison.OrdinalIgnoreCase) != -1 ||
+ codec.IndexOf("dvd", StringComparison.OrdinalIgnoreCase) != -1;
+ }
+ }
+
/// <summary>
/// Gets or sets the filename.
/// </summary>