models: Announce field for AnnounceResponse
This commit is contained in:
parent
222415f467
commit
938542ac74
2 changed files with 2 additions and 0 deletions
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue