add reader stat to torrent stat

This commit is contained in:
YouROK
2021-05-27 08:34:19 +03:00
parent bd44ebaf2b
commit 2af1752a00
5 changed files with 23 additions and 9 deletions

View File

@@ -1,5 +1,9 @@
package state
import (
"server/torr/storage/reader"
)
type TorrentStat int
func (t TorrentStat) String() string {
@@ -62,6 +66,8 @@ type TorrentStatus struct {
PiecesDirtiedGood int64 `json:"pieces_dirtied_good,omitempty"`
PiecesDirtiedBad int64 `json:"pieces_dirtied_bad,omitempty"`
Readers []*reader.ReaderState `json:"readers,omitempty"`
FileStats []*TorrentFileStat `json:"file_stats,omitempty"`
}