mirror of
https://github.com/sot-tech/mochi.git
synced 2026-07-30 19:18:11 -07:00
Only prune torrents if they have no peers
This commit is contained in:
@@ -103,6 +103,10 @@ func (t *Torrent) InLeecherPool(p *Peer) (exists bool) {
|
||||
return
|
||||
}
|
||||
|
||||
func (t *Torrent) PeerCount() int {
|
||||
return len(t.Seeders) + len(t.Leechers)
|
||||
}
|
||||
|
||||
// User is a registered user for private trackers.
|
||||
type User struct {
|
||||
ID uint64 `json:"id"`
|
||||
|
||||
Reference in New Issue
Block a user