public override DownloadClientStatus GetStatus() { var config = _proxy.GetConfig(Settings); var categories = GetCategories(config).ToArray(); var category = categories.FirstOrDefault(v => v.Name == Settings.TvCategory); if (category == null) { category = categories.FirstOrDefault(v => v.Name == "*"); } var status = new DownloadClientStatus { IsLocalhost = Settings.Host == "127.0.0.1" || Settings.Host == "localhost" }; if (category != null) { status.OutputRootFolders = new List <String> { _remotePathMappingService.RemapRemoteToLocal(Settings.Host, category.FullPath) }; } return(status); }
private ValidationFailure TestAuthentication() { try { _proxy.GetConfig(Settings); } catch (Exception ex) { if (ex.Message.ContainsIgnoreCase("API Key Incorrect")) { return(new ValidationFailure("APIKey", "API Key Incorrect")); } if (ex.Message.ContainsIgnoreCase("API Key Required")) { return(new ValidationFailure("APIKey", "API Key Required")); } throw; } return(null); }