mirror of
https://github.com/idanoo/autobrr
synced 2025-07-22 16:29:12 +00:00
fix(download-client): Deluge push error (#1719)
fix(downloadclient): Deluge push error
This commit is contained in:
parent
ac6f62db99
commit
2681c2357d
12 changed files with 12 additions and 5 deletions
|
@ -23,6 +23,7 @@ func (s *service) deluge(ctx context.Context, action *domain.Action, release dom
|
|||
if err != nil {
|
||||
return nil, errors.Wrap(err, "could not get client with id %d", action.ClientID)
|
||||
}
|
||||
action.Client = client
|
||||
|
||||
if !client.Enabled {
|
||||
return nil, errors.New("client %s %s not enabled", client.Type, client.Name)
|
||||
|
@ -30,7 +31,7 @@ func (s *service) deluge(ctx context.Context, action *domain.Action, release dom
|
|||
|
||||
var rejections []string
|
||||
|
||||
switch action.Client.Type {
|
||||
switch client.Type {
|
||||
case "DELUGE_V1":
|
||||
rejections, err = s.delugeV1(ctx, client, action, release)
|
||||
|
||||
|
|
|
@ -21,6 +21,7 @@ func (s *service) lidarr(ctx context.Context, action *domain.Action, release dom
|
|||
if err != nil {
|
||||
return nil, errors.Wrap(err, "could not get client with id %d", action.ClientID)
|
||||
}
|
||||
action.Client = client
|
||||
|
||||
if !client.Enabled {
|
||||
return nil, errors.New("client %s %s not enabled", client.Type, client.Name)
|
||||
|
|
|
@ -22,6 +22,7 @@ func (s *service) porla(ctx context.Context, action *domain.Action, release doma
|
|||
if err != nil {
|
||||
return nil, errors.Wrap(err, "could not get client with id %d", action.ClientID)
|
||||
}
|
||||
action.Client = client
|
||||
|
||||
if !client.Enabled {
|
||||
return nil, errors.New("client %s %s not enabled", client.Type, client.Name)
|
||||
|
|
|
@ -21,6 +21,7 @@ func (s *service) qbittorrent(ctx context.Context, action *domain.Action, releas
|
|||
if err != nil {
|
||||
return nil, errors.Wrap(err, "could not get client with id %d", action.ClientID)
|
||||
}
|
||||
action.Client = client
|
||||
|
||||
if !client.Enabled {
|
||||
return nil, errors.New("client %s %s not enabled", client.Type, client.Name)
|
||||
|
|
|
@ -21,6 +21,7 @@ func (s *service) radarr(ctx context.Context, action *domain.Action, release dom
|
|||
if err != nil {
|
||||
return nil, errors.Wrap(err, "could not get client with id %d", action.ClientID)
|
||||
}
|
||||
action.Client = client
|
||||
|
||||
if !client.Enabled {
|
||||
return nil, errors.New("client %s %s not enabled", client.Type, client.Name)
|
||||
|
|
|
@ -21,6 +21,7 @@ func (s *service) readarr(ctx context.Context, action *domain.Action, release do
|
|||
if err != nil {
|
||||
return nil, errors.Wrap(err, "could not get client with id %d", action.ClientID)
|
||||
}
|
||||
action.Client = client
|
||||
|
||||
if !client.Enabled {
|
||||
return nil, errors.New("client %s %s not enabled", client.Type, client.Name)
|
||||
|
|
|
@ -20,6 +20,7 @@ func (s *service) rtorrent(ctx context.Context, action *domain.Action, release d
|
|||
if err != nil {
|
||||
return nil, errors.Wrap(err, "could not get client with id %d", action.ClientID)
|
||||
}
|
||||
action.Client = client
|
||||
|
||||
if !client.Enabled {
|
||||
return nil, errors.New("client %s %s not enabled", client.Type, client.Name)
|
||||
|
|
|
@ -32,10 +32,6 @@ 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)
|
||||
}
|
||||
|
||||
// Check preconditions: download torrent file if needed
|
||||
if err := s.CheckActionPreconditions(ctx, action, release); err != nil {
|
||||
return nil, err
|
||||
|
|
|
@ -22,6 +22,7 @@ func (s *service) sabnzbd(ctx context.Context, action *domain.Action, release do
|
|||
if err != nil {
|
||||
return nil, errors.Wrap(err, "could not get client with id %d", action.ClientID)
|
||||
}
|
||||
action.Client = client
|
||||
|
||||
if !client.Enabled {
|
||||
return nil, errors.New("client %s %s not enabled", client.Type, client.Name)
|
||||
|
|
|
@ -21,6 +21,7 @@ func (s *service) sonarr(ctx context.Context, action *domain.Action, release dom
|
|||
if err != nil {
|
||||
return nil, errors.Wrap(err, "could not get client with id %d", action.ClientID)
|
||||
}
|
||||
action.Client = client
|
||||
|
||||
if !client.Enabled {
|
||||
return nil, errors.New("client %s %s not enabled", client.Type, client.Name)
|
||||
|
|
|
@ -29,6 +29,7 @@ func (s *service) transmission(ctx context.Context, action *domain.Action, relea
|
|||
if err != nil {
|
||||
return nil, errors.Wrap(err, "could not get client with id %d", action.ClientID)
|
||||
}
|
||||
action.Client = client
|
||||
|
||||
if !client.Enabled {
|
||||
return nil, errors.New("client %s %s not enabled", client.Type, client.Name)
|
||||
|
|
|
@ -21,6 +21,7 @@ func (s *service) whisparr(ctx context.Context, action *domain.Action, release d
|
|||
if err != nil {
|
||||
return nil, errors.Wrap(err, "could not get client with id %d", action.ClientID)
|
||||
}
|
||||
action.Client = client
|
||||
|
||||
if !client.Enabled {
|
||||
return nil, errors.New("client %s %s not enabled", client.Type, client.Name)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue