mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 00:39:13 +00:00
feat(qbit): refactor url parse and add basic auth support (#245)
* feat(qbit): add basic auth and refactor url parse * build: update dockerfile go base * feat: only show port for legacy reasons
This commit is contained in:
parent
cf326a6c10
commit
62ada6de37
7 changed files with 301 additions and 8 deletions
|
@ -50,6 +50,13 @@ func (s *service) testQbittorrentConnection(client domain.DownloadClient) error
|
|||
TLSSkipVerify: client.TLSSkipVerify,
|
||||
}
|
||||
|
||||
// only set basic auth if enabled
|
||||
if client.Settings.Basic.Auth {
|
||||
qbtSettings.BasicAuth = client.Settings.Basic.Auth
|
||||
qbtSettings.Basic.Username = client.Settings.Basic.Username
|
||||
qbtSettings.Basic.Password = client.Settings.Basic.Password
|
||||
}
|
||||
|
||||
qbt := qbittorrent.NewClient(qbtSettings)
|
||||
err := qbt.Login()
|
||||
if err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue