public SonarrCompatibility(IServerInfo serverInfo) { Capabilities = Observable.FromAsync( async() => await serverInfo.BuildRequest() .AppendPathSegment("system/status") .GetJsonAsync(), NewThreadScheduler.Default) .Timeout(TimeSpan.FromSeconds(15)) .Select(x => new Version(x.version)) .Select(BuildCapabilitiesObject) .Replay(1) .AutoConnect(); }
private IFlurlRequest BaseUrl() => _serverInfo.BuildRequest().SanitizedLogging(_log);
private IFlurlRequest BuildRequest() => _serverInfo.BuildRequest();