mirror of
https://github.com/sot-tech/mochi.git
synced 2026-05-08 21:29:08 -07:00
Introduce thread-safe PeerMap
This commit is contained in:
@@ -111,8 +111,8 @@ func filesDict(torrents []*models.Torrent) bencode.Dict {
|
||||
|
||||
func torrentDict(torrent *models.Torrent) bencode.Dict {
|
||||
return bencode.Dict{
|
||||
"complete": len(torrent.Seeders),
|
||||
"incomplete": len(torrent.Leechers),
|
||||
"complete": torrent.Seeders.Len(),
|
||||
"incomplete": torrent.Leechers.Len(),
|
||||
"downloaded": torrent.Snatches,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user