feat(clients): add support for qBittorrent 4.4.0+ (#558)

* refactor: move client to go-qbittorrent

* refactor: move client to go-qbittorrent

* feat(downloadclient): cache qbittorrent client

* feat(downloadclient): update qbit

* feat(downloadclient): client test and remove pkg qbit

* feat(downloadclient): update pkg qbit

* fix(release): method

* feat(release): make GetCachedClient concurrent safe

* feat(release): add additional tests for buildLegacyHost

* feat(release): remove branching

* chore: update pkg autobrr/go-qbittorrent to v.1.2.0
This commit is contained in:
ze0s 2022-12-10 19:25:04 +01:00 committed by GitHub
parent 6ad4abe296
commit 29da2416ec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 379 additions and 1764 deletions

View file

@ -86,6 +86,8 @@ func (s *service) Process(release *domain.Release) {
return
}
ctx := context.Background()
// TODO check in config for "Save all releases"
// TODO cross-seed check
// TODO dupe checks
@ -133,8 +135,7 @@ func (s *service) Process(release *domain.Release) {
// save release here to only save those with rejections from actions instead of all releases
if release.ID == 0 {
release.FilterStatus = domain.ReleaseStatusFilterApproved
err = s.Store(context.Background(), release)
if err != nil {
if err = s.Store(ctx, release); err != nil {
l.Error().Err(err).Msgf("release.Process: error writing release to database: %+v", release)
return
}
@ -166,7 +167,7 @@ func (s *service) Process(release *domain.Release) {
continue
}
rejections, err = s.actionSvc.RunAction(a, *release)
rejections, err = s.actionSvc.RunAction(ctx, a, *release)
if err != nil {
l.Error().Stack().Err(err).Msgf("release.Process: error running actions for filter: %v", release.Filter.Name)
continue