Update stream client; Add repair strategy

This commit is contained in:
Mukhtar Akere
2025-07-01 04:42:33 +01:00
parent a4ee0973cc
commit 8d092615db
5 changed files with 119 additions and 33 deletions

View File

@@ -115,8 +115,10 @@ func (a *Arr) Validate() error {
if err != nil {
return err
}
if resp.StatusCode != http.StatusOK {
return fmt.Errorf("arr test failed: %s", resp.Status)
defer resp.Body.Close()
// If response is not 200 or 404(this is the case for Lidarr, etc), return an error
if resp.StatusCode != http.StatusOK && resp.StatusCode != http.StatusNotFound {
return fmt.Errorf("failed to validate arr %s: %s", a.Name, resp.Status)
}
return nil
}