Skip to content

Commit

Permalink
fix: transmission progress
Browse files Browse the repository at this point in the history
  • Loading branch information
simon-ding committed Jul 12, 2024
1 parent 1b3faa7 commit f2ee307
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/transmission/transmission.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit f2ee307

Please sign in to comment.