mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 08:49:13 +00:00
fix(actions): reject if client is disabled (#1626)
* fix(actions): error on disabled client * fix(actions): sql scan args * refactor: download client cache for actions * fix: tests client store * fix: tests client store and int conversion * fix: tests revert findbyid ctx timeout * fix: tests row.err * feat: add logging to download client cache
This commit is contained in:
parent
77e1c2c305
commit
861f30c144
30 changed files with 928 additions and 680 deletions
|
@ -19,7 +19,6 @@ import (
|
|||
)
|
||||
|
||||
func (s *service) RunAction(ctx context.Context, action *domain.Action, release *domain.Release) ([]string, error) {
|
||||
|
||||
var (
|
||||
err error
|
||||
rejections []string
|
||||
|
@ -33,6 +32,10 @@ func (s *service) RunAction(ctx context.Context, action *domain.Action, release
|
|||
}
|
||||
}()
|
||||
|
||||
if action.ClientID > 0 && action.Client != nil && !action.Client.Enabled {
|
||||
return nil, errors.New("action %s client %s %s not enabled, skipping", action.Name, action.Client.Type, action.Client.Name)
|
||||
}
|
||||
|
||||
// if set, try to resolve MagnetURI before parsing macros
|
||||
// to allow webhook and exec to get the magnet_uri
|
||||
if err := release.ResolveMagnetUri(ctx); err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue