feat(actions): qbit rules set ratio and seed time limits (#264)

This commit is contained in:
Ludvig Lundgren 2022-05-03 14:57:47 +02:00 committed by GitHub
parent 43d37fc859
commit 8b1174c65f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 86 additions and 6 deletions

View file

@ -62,6 +62,12 @@ func (s *service) qbittorrent(qbt *qbittorrent.Client, action domain.Action, rel
if action.LimitDownloadSpeed > 0 {
options["dlLimit"] = strconv.FormatInt(action.LimitDownloadSpeed, 10)
}
if action.LimitRatio > 0 {
options["ratioLimit"] = strconv.FormatFloat(action.LimitRatio, 'r', 2, 64)
}
if action.LimitSeedTime > 0 {
options["seedingTimeLimit"] = strconv.FormatInt(action.LimitSeedTime, 10)
}
log.Trace().Msgf("action qBittorrent options: %+v", options)