Merge pull request #2032 from MediaBrowser/dev

Dev
pull/702/head
Luke 8 years ago committed by GitHub
commit 82d4566c6d

@ -248,8 +248,7 @@ namespace MediaBrowser.Dlna
//_logger.Debug("IsMatch-Substring value: {0} testValue: {1} isMatch: {2}", value, header.Value, isMatch);
return isMatch;
case HeaderMatchType.Regex:
// 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);
return Regex.IsMatch(value, header.Value, RegexOptions.IgnoreCase);
default:
throw new ArgumentException("Unrecognized HeaderMatchType");
}

@ -21,8 +21,8 @@ namespace MediaBrowser.Dlna.Profiles
new HttpHeaderInfo
{
Name = "User-Agent",
Value = @".*(SEC_HHP_\[TV\] [A-Z]{2}\d{2}J[A-Z]?\d{3,4})*.",
Match = HeaderMatchType.Regex
Value = @"SEC_",
Match = HeaderMatchType.Substring
}
}
};
@ -349,4 +349,4 @@ namespace MediaBrowser.Dlna.Profiles
};
}
}
}
}

@ -4,7 +4,7 @@
<Identification>
<ModelUrl>samsung.com</ModelUrl>
<Headers>
<HttpHeaderInfo name="User-Agent" value=".*(SEC_HHP_\[TV\] [A-Z]{2}\d{2}J[A-Z]?\d{3,4})*." match="Regex" />
<HttpHeaderInfo name="User-Agent" value="SEC_" match="Substring" />
</Headers>
</Identification>
<Manufacturer>Emby</Manufacturer>

@ -65,12 +65,11 @@ namespace MediaBrowser.Server.Implementations.Connect
if (!string.IsNullOrWhiteSpace(address))
{
try
{
address = new Uri(address).Host;
}
catch
Uri newUri;
if (Uri.TryCreate(address, UriKind.Absolute, out newUri))
{
address = newUri.Host;
}
}

@ -73,8 +73,8 @@
<HintPath>..\packages\SimpleInjector.3.2.0\lib\net45\SimpleInjector.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="SocketHttpListener, Version=1.0.6062.28575, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\SocketHttpListener.1.0.0.38\lib\net45\SocketHttpListener.dll</HintPath>
<Reference Include="SocketHttpListener, Version=1.0.6063.4624, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\SocketHttpListener.1.0.0.39\lib\net45\SocketHttpListener.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />

@ -9,5 +9,5 @@
<package id="morelinq" version="1.4.0" targetFramework="net45" />
<package id="Patterns.Logging" version="1.0.0.2" targetFramework="net45" />
<package id="SimpleInjector" version="3.2.0" targetFramework="net45" />
<package id="SocketHttpListener" version="1.0.0.38" targetFramework="net45" />
<package id="SocketHttpListener" version="1.0.0.39" targetFramework="net45" />
</packages>

@ -65,9 +65,6 @@ EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Emby.Drawing", "Emby.Drawing\Emby.Drawing.csproj", "{08FFF49B-F175-4807-A2B5-73B0EBD9F716}"
EndProject
Global
GlobalSection(Performance) = preSolution
HasPerformanceSessions = true
EndGlobalSection
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|Mixed Platforms = Debug|Mixed Platforms

Loading…
Cancel
Save