mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 08:49:13 +00:00
fix(actions): handle non download client actions (#903)
fix(actions): handle non download clients
This commit is contained in:
parent
c1746dc7d6
commit
1ca2677f9f
2 changed files with 17 additions and 10 deletions
|
@ -97,23 +97,25 @@ func (s *service) RunAction(ctx context.Context, action *domain.Action, release
|
|||
}
|
||||
|
||||
payload := &domain.NotificationPayload{
|
||||
Event: domain.NotificationEventPushApproved,
|
||||
ReleaseName: release.TorrentName,
|
||||
Filter: release.Filter.Name,
|
||||
Indexer: release.Indexer,
|
||||
InfoHash: release.TorrentHash,
|
||||
|
||||
Event: domain.NotificationEventPushApproved,
|
||||
ReleaseName: release.TorrentName,
|
||||
Filter: release.Filter.Name,
|
||||
Indexer: release.Indexer,
|
||||
InfoHash: release.TorrentHash,
|
||||
Size: release.Size,
|
||||
Status: domain.ReleasePushStatusApproved,
|
||||
Action: action.Name,
|
||||
ActionType: action.Type,
|
||||
ActionClient: action.Client.Name,
|
||||
Rejections: []string{},
|
||||
Protocol: domain.ReleaseProtocolTorrent,
|
||||
Protocol: release.Protocol,
|
||||
Implementation: release.Implementation,
|
||||
Timestamp: time.Now(),
|
||||
}
|
||||
|
||||
if action.Client != nil {
|
||||
payload.ActionClient = action.Client.Name
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
s.log.Error().Err(err).Msgf("process action failed: %v for '%v'", action.Name, release.TorrentName)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue