feat(download-clients): rtorrent support Digest Auth (#1596)

* feat(download-clients): rtorrent support basic auth

* feat(download-client): implement new auth logic

* fix(download-client): tests store

* chore(deps): update go-rtorrent to v1.11.0
This commit is contained in:
ze0s 2024-08-28 12:21:56 +02:00 committed by GitHub
parent 861f30c144
commit 0d53f7e5fc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 231 additions and 71 deletions

View file

@ -142,6 +142,7 @@ func (r *DownloadClientRepo) Store(ctx context.Context, client *domain.DownloadC
Rules: client.Settings.Rules,
ExternalDownloadClientId: client.Settings.ExternalDownloadClientId,
ExternalDownloadClient: client.Settings.ExternalDownloadClient,
Auth: client.Settings.Auth,
}
settingsJson, err := json.Marshal(&settings)
@ -177,6 +178,7 @@ func (r *DownloadClientRepo) Update(ctx context.Context, client *domain.Download
Rules: client.Settings.Rules,
ExternalDownloadClientId: client.Settings.ExternalDownloadClientId,
ExternalDownloadClient: client.Settings.ExternalDownloadClient,
Auth: client.Settings.Auth,
}
settingsJson, err := json.Marshal(&settings)

View file

@ -44,6 +44,12 @@ func getMockDownloadClient() domain.DownloadClient {
},
ExternalDownloadClientId: 0,
ExternalDownloadClient: "",
Auth: domain.DownloadClientAuth{
Enabled: true,
Type: domain.DownloadClientAuthTypeBasic,
Username: "username",
Password: "password",
},
},
}
}