models: Announce field for AnnounceResponse

This commit is contained in:
Jimmy Zelinskie
2015-04-04 15:34:16 -04:00
parent 222415f467
commit 938542ac74
2 changed files with 2 additions and 0 deletions
+1
View File
@@ -264,6 +264,7 @@ func newAnnounceResponse(ann *models.Announce) *models.AnnounceResponse {
leechCount := ann.Torrent.Leechers.Len()
res := &models.AnnounceResponse{
Announce: ann,
Complete: seedCount,
Incomplete: leechCount,
Interval: ann.Config.Announce.Duration,
+1
View File
@@ -256,6 +256,7 @@ type AnnounceDelta struct {
// AnnounceResponse contains the information needed to fulfill an announce.
type AnnounceResponse struct {
Announce *Announce
Complete, Incomplete int
Interval, MinInterval time.Duration
IPv4Peers, IPv6Peers PeerList