Feature: Download client rules (#18)

* feat(web): add and update download client rules

* feat: add and update download client rules

* feat: add active downloads check

* chore: update pkg

* feat: deluge max active downloads

* feat: use basic rules for deluge

* feat: add as paused

* refactor: download file if needed

* feat: better errors qbit
This commit is contained in:
Ludvig Lundgren 2021-09-10 16:54:30 +02:00 committed by GitHub
parent 09eb0b1716
commit c02f16b64d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 628 additions and 228 deletions

View file

@ -46,8 +46,6 @@ func (s *service) Store(client domain.DownloadClient) (*domain.DownloadClient, e
// validate data
if client.Host == "" {
return nil, errors.New("validation error: no host")
} else if client.Port == 0 {
return nil, errors.New("validation error: no port")
} else if client.Type == "" {
return nil, errors.New("validation error: no type")
}
@ -75,8 +73,6 @@ func (s *service) Test(client domain.DownloadClient) error {
// basic validation of client
if client.Host == "" {
return errors.New("validation error: no host")
} else if client.Port == 0 {
return errors.New("validation error: no port")
} else if client.Type == "" {
return errors.New("validation error: no type")
}