mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 08:49:13 +00:00
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:
parent
6ad4abe296
commit
29da2416ec
17 changed files with 379 additions and 1764 deletions
|
@ -17,7 +17,7 @@ type downloadClientService interface {
|
|||
Store(ctx context.Context, client domain.DownloadClient) (*domain.DownloadClient, error)
|
||||
Update(ctx context.Context, client domain.DownloadClient) (*domain.DownloadClient, error)
|
||||
Delete(ctx context.Context, clientID int) error
|
||||
Test(client domain.DownloadClient) error
|
||||
Test(ctx context.Context, client domain.DownloadClient) error
|
||||
}
|
||||
|
||||
type downloadClientHandler struct {
|
||||
|
@ -77,8 +77,7 @@ func (h downloadClientHandler) test(w http.ResponseWriter, r *http.Request) {
|
|||
return
|
||||
}
|
||||
|
||||
err := h.service.Test(data)
|
||||
if err != nil {
|
||||
if err := h.service.Test(r.Context(), data); err != nil {
|
||||
h.encoder.Error(w, err)
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue