예제 #1
0
 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();
 }
예제 #2
0
 private IFlurlRequest BaseUrl() => _serverInfo.BuildRequest().SanitizedLogging(_log);
예제 #3
0
 private IFlurlRequest BuildRequest() => _serverInfo.BuildRequest();