From f2ee307a03d85a88859223d42f037ee643f50a5d Mon Sep 17 00:00:00 2001 From: Simon Ding Date: Fri, 12 Jul 2024 20:04:07 +0800 Subject: [PATCH] fix: transmission progress --- pkg/transmission/transmission.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg/transmission/transmission.go b/pkg/transmission/transmission.go index 4d639fae..068ddff1 100644 --- a/pkg/transmission/transmission.go +++ b/pkg/transmission/transmission.go @@ -93,7 +93,11 @@ func (t *Torrent) Progress() int { return 100 } if t.getTorrent().PercentDone != nil { - return int(*t.getTorrent().PercentDone * 100) + p := int(*t.getTorrent().PercentDone * 100) + if p == 100 { + p = 99 + } + return p } return 0 }