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, 11 insertions, 7 deletions
diff --git a/MediaBrowser.Model/Entities/MediaStream.cs b/MediaBrowser.Model/Entities/MediaStream.cs
index 4a9b765c2..db4a68cff 100644
--- a/MediaBrowser.Model/Entities/MediaStream.cs
+++ b/MediaBrowser.Model/Entities/MediaStream.cs
@@ -141,16 +141,20 @@ namespace MediaBrowser.Model.Entities
{
if (Type != MediaStreamType.Subtitle) return false;
- string codec = Codec ?? string.Empty;
-
- // sub = external .sub file
-
- return StringHelper.IndexOfIgnoreCase(codec, "pgs") == -1 &&
- StringHelper.IndexOfIgnoreCase(codec, "dvd") == -1 &&
- !StringHelper.EqualsIgnoreCase(codec, "sub");
+ return IsTextFormat(Codec);
}
}
+ public static bool IsTextFormat(string format)
+ {
+ string codec = format ?? string.Empty;
+
+ // sub = external .sub file
+
+ return StringHelper.IndexOfIgnoreCase(codec, "pgs") == -1 &&
+ StringHelper.IndexOfIgnoreCase(codec, "dvd") == -1 &&
+ !StringHelper.EqualsIgnoreCase(codec, "sub");
+ }
/// <summary>
/// Gets or sets the filename.