mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-06 03:26:07 +02:00
update dlna profile header checks
This commit is contained in:
parent
4a24490752
commit
9e568bf99a
1 changed files with 9 additions and 8 deletions
|
@ -251,7 +251,8 @@ namespace MediaBrowser.Dlna
|
||||||
case HeaderMatchType.Substring:
|
case HeaderMatchType.Substring:
|
||||||
return value.IndexOf(header.Value, StringComparison.OrdinalIgnoreCase) != -1;
|
return value.IndexOf(header.Value, StringComparison.OrdinalIgnoreCase) != -1;
|
||||||
case HeaderMatchType.Regex:
|
case HeaderMatchType.Regex:
|
||||||
return Regex.IsMatch(value, header.Value, RegexOptions.IgnoreCase);
|
// Reports of IgnoreCase not working on linux so try it a couple different ways.
|
||||||
|
return Regex.IsMatch(value, header.Value, RegexOptions.IgnoreCase) || Regex.IsMatch(value.ToUpper(), header.Value.ToUpper(), RegexOptions.IgnoreCase);
|
||||||
default:
|
default:
|
||||||
throw new ArgumentException("Unrecognized HeaderMatchType");
|
throw new ArgumentException("Unrecognized HeaderMatchType");
|
||||||
}
|
}
|
||||||
|
@ -318,7 +319,7 @@ namespace MediaBrowser.Dlna
|
||||||
throw new ArgumentNullException("id");
|
throw new ArgumentNullException("id");
|
||||||
}
|
}
|
||||||
|
|
||||||
var info = GetProfileInfosInternal().First(i => string.Equals(i.Info.Id, id));
|
var info = GetProfileInfosInternal().First(i => string.Equals(i.Info.Id, id, StringComparison.OrdinalIgnoreCase));
|
||||||
|
|
||||||
return ParseProfileXmlFile(info.Path, info.Info.Type);
|
return ParseProfileXmlFile(info.Path, info.Info.Type);
|
||||||
}
|
}
|
||||||
|
@ -400,7 +401,7 @@ namespace MediaBrowser.Dlna
|
||||||
|
|
||||||
public void DeleteProfile(string id)
|
public void DeleteProfile(string id)
|
||||||
{
|
{
|
||||||
var info = GetProfileInfosInternal().First(i => string.Equals(id, i.Info.Id));
|
var info = GetProfileInfosInternal().First(i => string.Equals(id, i.Info.Id, StringComparison.OrdinalIgnoreCase));
|
||||||
|
|
||||||
if (info.Info.Type == DeviceProfileType.System)
|
if (info.Info.Type == DeviceProfileType.System)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue