|
|
|
@ -1944,6 +1944,38 @@ namespace MediaBrowser.Model.Dlna
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
case ProfileConditionValue.VideoCodecTag:
|
|
|
|
|
{
|
|
|
|
|
if (string.IsNullOrEmpty(qualifier))
|
|
|
|
|
{
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// change from split by | to comma
|
|
|
|
|
// strip spaces to avoid having to encode
|
|
|
|
|
var values = value
|
|
|
|
|
.Split('|', StringSplitOptions.RemoveEmptyEntries | StringSplitOptions.TrimEntries);
|
|
|
|
|
|
|
|
|
|
if (condition.Condition == ProfileConditionType.Equals)
|
|
|
|
|
{
|
|
|
|
|
item.SetOption(qualifier, "codectag", string.Join(',', values));
|
|
|
|
|
}
|
|
|
|
|
else if (condition.Condition == ProfileConditionType.EqualsAny)
|
|
|
|
|
{
|
|
|
|
|
var currentValue = item.GetOption(qualifier, "codectag");
|
|
|
|
|
if (!string.IsNullOrEmpty(currentValue) && values.Any(v => string.Equals(v, currentValue, StringComparison.OrdinalIgnoreCase)))
|
|
|
|
|
{
|
|
|
|
|
item.SetOption(qualifier, "codectag", currentValue);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
item.SetOption(qualifier, "codectag", string.Join(',', values));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
case ProfileConditionValue.Height:
|
|
|
|
|
{
|
|
|
|
|
if (!enableNonQualifiedConditions)
|
|
|
|
|