aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Model/Entities/MediaStream.cs
diff options
context:
space:
mode:
authorLuke <luke.pulverenti@gmail.com>2015-02-09 16:58:30 -0500
committerLuke <luke.pulverenti@gmail.com>2015-02-09 16:58:30 -0500
commit4cc3b2f0ccd7c092a4acf72db4903415e175037a (patch)
treef9f90f8665b726253b8b357674f2f141aa43abc9 /MediaBrowser.Model/Entities/MediaStream.cs
parente7037a9b80843c127712f11430239f8fa3cb4aed (diff)
parent3d7089a7dbabb652730c892206ca050f52f832b1 (diff)
Merge pull request #1005 from MediaBrowser/dev
3.0.5518.0
Diffstat (limited to 'MediaBrowser.Model/Entities/MediaStream.cs')
-rw-r--r--MediaBrowser.Model/Entities/MediaStream.cs24
1 files changed, 17 insertions, 7 deletions
diff --git a/MediaBrowser.Model/Entities/MediaStream.cs b/MediaBrowser.Model/Entities/MediaStream.cs
index 4a9b765c2..4af32bb50 100644
--- a/MediaBrowser.Model/Entities/MediaStream.cs
+++ b/MediaBrowser.Model/Entities/MediaStream.cs
@@ -50,7 +50,7 @@ namespace MediaBrowser.Model.Entities
/// </summary>
/// <value>The reference frames.</value>
public int? RefFrames { get; set; }
-
+
/// <summary>
/// Gets or sets the length of the packet.
/// </summary>
@@ -141,16 +141,26 @@ namespace MediaBrowser.Model.Entities
{
if (Type != MediaStreamType.Subtitle) return false;
- string codec = Codec ?? string.Empty;
+ return IsTextFormat(Codec);
+ }
+ }
+
+ public static bool IsTextFormat(string format)
+ {
+ string codec = format ?? string.Empty;
- // sub = external .sub file
+ // sub = external .sub file
- return StringHelper.IndexOfIgnoreCase(codec, "pgs") == -1 &&
- StringHelper.IndexOfIgnoreCase(codec, "dvd") == -1 &&
- !StringHelper.EqualsIgnoreCase(codec, "sub");
- }
+ return StringHelper.IndexOfIgnoreCase(codec, "pgs") == -1 &&
+ StringHelper.IndexOfIgnoreCase(codec, "dvd") == -1 &&
+ !StringHelper.EqualsIgnoreCase(codec, "sub");
}
+ /// <summary>
+ /// Gets or sets a value indicating whether [supports external stream].
+ /// </summary>
+ /// <value><c>true</c> if [supports external stream]; otherwise, <c>false</c>.</value>
+ public bool SupportsExternalStream { get; set; }
/// <summary>
/// Gets or sets the filename.