Add TorrentStats.PiecesComplete
Fixes https://github.com/anacrolix/torrent/issues/352.
This commit is contained in:
parent
62c83a5b9c
commit
72a06d88fc
|
@ -1760,6 +1760,7 @@ func (t *Torrent) statsLocked() (ret TorrentStats) {
|
|||
}
|
||||
}
|
||||
ret.ConnStats = t.stats.Copy()
|
||||
ret.PiecesComplete = t.numPiecesCompleted()
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
@ -13,4 +13,5 @@ type TorrentStats struct {
|
|||
ActivePeers int
|
||||
ConnectedSeeders int
|
||||
HalfOpenPeers int
|
||||
PiecesComplete int
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue