From f2ca9b40db44a156d6591868594fda6ed793f24a Mon Sep 17 00:00:00 2001 From: Andy Hsu Date: Tue, 25 Jul 2023 13:31:41 +0800 Subject: [PATCH] fix(qbittorrent): incorrect field type (close #4843) --- internal/qbittorrent/client.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/internal/qbittorrent/client.go b/internal/qbittorrent/client.go index 1f8fa062..ec3f7e7b 100644 --- a/internal/qbittorrent/client.go +++ b/internal/qbittorrent/client.go @@ -3,12 +3,13 @@ package qbittorrent import ( "bytes" "errors" - "github.com/alist-org/alist/v3/pkg/utils" "io" "mime/multipart" "net/http" "net/http/cookiejar" "net/url" + + "github.com/alist-org/alist/v3/pkg/utils" ) type Client interface { @@ -213,7 +214,7 @@ type TorrentInfo struct { Hash string `json:"hash"` // LastActivity int `json:"last_activity"` // 上次活跃的时间(Unix Epoch) MagnetURI string `json:"magnet_uri"` // 与此 torrent 对应的 Magnet URI - MaxRatio int `json:"max_ratio"` // 种子/上传停止种子前的最大共享比率 + MaxRatio float64 `json:"max_ratio"` // 种子/上传停止种子前的最大共享比率 MaxSeedingTime int `json:"max_seeding_time"` // 停止种子种子前的最长种子时间(秒) Name string `json:"name"` // NumComplete int `json:"num_complete"` //