Remove StringHelper functions

This commit is contained in:
Bond-009
2020-01-09 17:07:13 +01:00
parent 162c1ac7b7
commit fdbb329118
16 changed files with 146 additions and 164 deletions

View File

@@ -88,11 +88,11 @@ namespace MediaBrowser.Model.Entities
{
attributes.Add(StringHelper.FirstToUpper(Language));
}
if (!string.IsNullOrEmpty(Codec) && !StringHelper.EqualsIgnoreCase(Codec, "dca"))
if (!string.IsNullOrEmpty(Codec) && !string.Equals(Codec, "dca", StringComparison.OrdinalIgnoreCase))
{
attributes.Add(AudioCodec.GetFriendlyName(Codec));
}
else if (!string.IsNullOrEmpty(Profile) && !StringHelper.EqualsIgnoreCase(Profile, "lc"))
else if (!string.IsNullOrEmpty(Profile) && !string.Equals(Profile, "lc", StringComparison.OrdinalIgnoreCase))
{
attributes.Add(Profile);
}
@@ -394,8 +394,8 @@ namespace MediaBrowser.Model.Entities
return codec.IndexOf("pgs", StringComparison.OrdinalIgnoreCase) == -1 &&
codec.IndexOf("dvd", StringComparison.OrdinalIgnoreCase) == -1 &&
codec.IndexOf("dvbsub", StringComparison.OrdinalIgnoreCase) == -1 &&
!StringHelper.EqualsIgnoreCase(codec, "sub") &&
!StringHelper.EqualsIgnoreCase(codec, "dvb_subtitle");
!string.Equals(codec, "sub", StringComparison.OrdinalIgnoreCase) &&
!string.Equals(codec, "dvb_subtitle", StringComparison.OrdinalIgnoreCase);
}
public bool SupportsSubtitleConversionTo(string toCodec)
@@ -408,21 +408,21 @@ namespace MediaBrowser.Model.Entities
var fromCodec = Codec;
// Can't convert from this
if (StringHelper.EqualsIgnoreCase(fromCodec, "ass"))
if (string.Equals(fromCodec, "ass", StringComparison.OrdinalIgnoreCase))
{
return false;
}
if (StringHelper.EqualsIgnoreCase(fromCodec, "ssa"))
if (string.Equals(fromCodec, "ssa", StringComparison.OrdinalIgnoreCase))
{
return false;
}
// Can't convert to this
if (StringHelper.EqualsIgnoreCase(toCodec, "ass"))
if (string.Equals(toCodec, "ass", StringComparison.OrdinalIgnoreCase))
{
return false;
}
if (StringHelper.EqualsIgnoreCase(toCodec, "ssa"))
if (string.Equals(toCodec, "ssa", StringComparison.OrdinalIgnoreCase))
{
return false;
}