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
|
@ -109,18 +109,23 @@ type ReleaseActionStatus struct {
|
|||
}
|
||||
|
||||
func NewReleaseActionStatus(action *Action, release *Release) *ReleaseActionStatus {
|
||||
return &ReleaseActionStatus{
|
||||
s := &ReleaseActionStatus{
|
||||
ID: 0,
|
||||
Status: ReleasePushStatusPending,
|
||||
Action: action.Name,
|
||||
Type: action.Type,
|
||||
Client: action.Client.Name,
|
||||
Filter: release.Filter.Name,
|
||||
FilterID: int64(release.Filter.ID),
|
||||
Rejections: []string{},
|
||||
Timestamp: time.Now(),
|
||||
ReleaseID: release.ID,
|
||||
}
|
||||
|
||||
if action.Client != nil {
|
||||
s.Client = action.Client.Name
|
||||
}
|
||||
|
||||
return s
|
||||
}
|
||||
|
||||
type DownloadTorrentFileResponse struct {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue