feat: better prowlarr support

This commit is contained in:
Simon Ding
2024-11-04 15:10:56 +08:00
parent b176253fc4
commit c17cf750e5
5 changed files with 28 additions and 10 deletions

View File

@@ -319,7 +319,7 @@ func (s *Server) SaveProwlarrSetting(c *gin.Context) (interface{}, error) {
return nil, err
}
client := prowlarr.New(in.ApiKey, in.URL)
if _, err := client.GetIndexers(); err != nil {
if _, err := client.GetIndexers(prowlarr.TV); err != nil {
return nil, errors.Wrap(err, "connect to prowlarr error")
}
err := s.db.SaveProwlarrSetting(&in)