|
|
@ -24,8 +24,14 @@ namespace NzbDrone.Common.Http
|
|
|
|
|
|
|
|
|
|
|
|
public UserAgentBuilder(IOsInfo osInfo)
|
|
|
|
public UserAgentBuilder(IOsInfo osInfo)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var osName = osInfo.Name.ToLower();
|
|
|
|
var osName = OsInfo.Os.ToString();
|
|
|
|
var osVersion = osInfo.Version.ToLower();
|
|
|
|
|
|
|
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(osInfo.Name))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
osName = osInfo.Name.ToLower();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var osVersion = osInfo.Version?.ToLower();
|
|
|
|
|
|
|
|
|
|
|
|
_userAgent = $"Sonarr/{BuildInfo.Version} ({osName} {osVersion})";
|
|
|
|
_userAgent = $"Sonarr/{BuildInfo.Version} ({osName} {osVersion})";
|
|
|
|
_userAgentSimplified = $"Sonarr/{BuildInfo.Version.ToString(2)}";
|
|
|
|
_userAgentSimplified = $"Sonarr/{BuildInfo.Version.ToString(2)}";
|
|
|
|