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()
|
leechCount := ann.Torrent.Leechers.Len()
|
||||||
|
|
||||||
res := &models.AnnounceResponse{
|
res := &models.AnnounceResponse{
|
||||||
|
Announce: ann,
|
||||||
Complete: seedCount,
|
Complete: seedCount,
|
||||||
Incomplete: leechCount,
|
Incomplete: leechCount,
|
||||||
Interval: ann.Config.Announce.Duration,
|
Interval: ann.Config.Announce.Duration,
|
||||||
|
|
|
@ -256,6 +256,7 @@ type AnnounceDelta struct {
|
||||||
|
|
||||||
// AnnounceResponse contains the information needed to fulfill an announce.
|
// AnnounceResponse contains the information needed to fulfill an announce.
|
||||||
type AnnounceResponse struct {
|
type AnnounceResponse struct {
|
||||||
|
Announce *Announce
|
||||||
Complete, Incomplete int
|
Complete, Incomplete int
|
||||||
Interval, MinInterval time.Duration
|
Interval, MinInterval time.Duration
|
||||||
IPv4Peers, IPv6Peers PeerList
|
IPv4Peers, IPv6Peers PeerList
|
||||||
|
|
Loading…
Add table
Reference in a new issue