fix(actions): handle non download client actions (#903)

fix(actions): handle non download clients
This commit is contained in:
ze0s 2023-05-03 00:10:29 +02:00 committed by GitHub
parent c1746dc7d6
commit 1ca2677f9f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 10 deletions

View file

@ -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 {