()
| 17 | } |
| 18 | |
| 19 | @Override |
| 20 | public boolean valid() { |
| 21 | JsonNode response = get("/api"); |
| 22 | if (response == null) { |
| 23 | return false; |
| 24 | } |
| 25 | String current = response.getObject().getString("current"); |
| 26 | if (current == null || !current.equalsIgnoreCase(version())) { |
| 27 | logger.warn("RADARR_{} returned unexpected response for URL {}: {}", this.id, this.baseUrl + "/api", response.getObject().toString()); |
| 28 | return false; |
| 29 | } |
| 30 | return true; |
| 31 | } |
| 32 | |
| 33 | @Override |
| 34 | public @NotNull ArrType type() { |
no test coverage detected