subtitle profile fixes

This commit is contained in:
Luke Pulverenti
2015-02-02 13:14:02 -05:00
parent 71bdb8dc8a
commit be070a0bfe
2 changed files with 34 additions and 17 deletions

View File

@@ -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.