mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 08:49:13 +00:00
fix(releases): retry action missing external indexer identifier (#1612)
* fix(releases): retry action missing external identifier * fix(actions): arrs set fallback indexer identifier
This commit is contained in:
parent
3183e15a4b
commit
abfac05b66
9 changed files with 105 additions and 18 deletions
|
@ -375,19 +375,31 @@ func (s *service) Retry(ctx context.Context, req *domain.ReleaseActionRetryReq)
|
|||
// get release
|
||||
release, err := s.Get(ctx, &domain.GetReleaseRequest{Id: req.ReleaseId})
|
||||
if err != nil {
|
||||
return err
|
||||
return errors.Wrap(err, "retry error: could not find release by id: %d", req.ReleaseId)
|
||||
}
|
||||
|
||||
indexerInfo, err := s.indexerSvc.GetBy(ctx, domain.GetIndexerRequest{Identifier: release.Indexer.Identifier})
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "retry error: could not get indexer by identifier: %s", release.Indexer.Identifier)
|
||||
}
|
||||
|
||||
release.Indexer = domain.IndexerMinimal{
|
||||
ID: int(indexerInfo.ID),
|
||||
Name: indexerInfo.Name,
|
||||
Identifier: indexerInfo.Identifier,
|
||||
IdentifierExternal: indexerInfo.IdentifierExternal,
|
||||
}
|
||||
|
||||
// get release filter action status
|
||||
status, err := s.GetActionStatus(ctx, &domain.GetReleaseActionStatusRequest{Id: req.ActionStatusId})
|
||||
if err != nil {
|
||||
return err
|
||||
return errors.Wrap(err, "retry error: could not get release action")
|
||||
}
|
||||
|
||||
// get filter action with action id from status
|
||||
filterAction, err := s.actionSvc.Get(ctx, &domain.GetActionRequest{Id: int(status.ActionID)})
|
||||
if err != nil {
|
||||
return err
|
||||
return errors.Wrap(err, "retry error: could not get filter action for release")
|
||||
}
|
||||
|
||||
// run filterAction
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue