added IsTextSubtitleStream

This commit is contained in:
Luke Pulverenti
2014-06-11 16:57:18 -04:00
parent dd7825f6c8
commit a18f4e37ac
11 changed files with 33 additions and 15 deletions

View File

@@ -130,19 +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; }
public bool IsGraphicalSubtitleStream
public bool IsTextSubtitleStream
{
get
{
if (IsExternal) return false;
if (Type != MediaStreamType.Subtitle) return false;
var codec = Codec ?? string.Empty;
return StringHelper.IndexOfIgnoreCase(codec, "pgs") != -1 ||
StringHelper.IndexOfIgnoreCase(codec, "dvd") != -1;
return StringHelper.IndexOfIgnoreCase(codec, "pgs") == -1 &&
StringHelper.IndexOfIgnoreCase(codec, "dvd") == -1;
}
}
/// <summary>
/// Gets or sets the filename.
/// </summary>