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
|
@ -22,6 +22,7 @@ type IndexerRepo interface {
|
|||
Delete(ctx context.Context, id int) error
|
||||
FindByFilterID(ctx context.Context, id int) ([]Indexer, error)
|
||||
FindByID(ctx context.Context, id int) (*Indexer, error)
|
||||
GetBy(ctx context.Context, req GetIndexerRequest) (*Indexer, error)
|
||||
ToggleEnabled(ctx context.Context, indexerID int, enabled bool) error
|
||||
}
|
||||
|
||||
|
@ -43,6 +44,14 @@ type IndexerMinimal struct {
|
|||
IdentifierExternal string `json:"identifier_external"`
|
||||
}
|
||||
|
||||
func (m IndexerMinimal) GetExternalIdentifier() string {
|
||||
if m.IdentifierExternal != "" {
|
||||
return m.IdentifierExternal
|
||||
}
|
||||
|
||||
return m.Identifier
|
||||
}
|
||||
|
||||
type IndexerDefinition struct {
|
||||
ID int `json:"id,omitempty"`
|
||||
Name string `json:"name"`
|
||||
|
@ -412,3 +421,9 @@ type IndexerTestApiRequest struct {
|
|||
ApiUser string `json:"api_user,omitempty"`
|
||||
ApiKey string `json:"api_key"`
|
||||
}
|
||||
|
||||
type GetIndexerRequest struct {
|
||||
ID int
|
||||
Identifier string
|
||||
Name string
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue