Only prune torrents if they have no peers

This commit is contained in:
Justin Li
2014-07-16 14:11:01 -04:00
parent 5f4f63cc44
commit e29fb21edb
3 changed files with 14 additions and 3 deletions
+4
View File
@@ -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"`