From fec023e4041fd990714733920e8d7d80a17144d9 Mon Sep 17 00:00:00 2001 From: Eliot Whalan Date: Thu, 11 May 2017 09:31:10 +1000 Subject: [PATCH] Add display of seeders/peers/completed to view --- model/torrent.go | 2 ++ templates/view.html | 3 +++ 2 files changed, 5 insertions(+) diff --git a/model/torrent.go b/model/torrent.go index 2bef0eb4..d3fca060 100644 --- a/model/torrent.go +++ b/model/torrent.go @@ -108,6 +108,7 @@ type TorrentJSON struct { TorrentLink template.URL `json:"torrent"` Seeders uint32 `json:"seeders"` Leechers uint32 `json:"leechers"` + Completed uint32 `json:"completed"` LastScrape time.Time `json:"last_scrape"` } @@ -151,6 +152,7 @@ func (t *Torrent) ToJSON() TorrentJSON { TorrentLink: util.Safe(torrentlink), Leechers: t.Leechers, Seeders: t.Seeders, + Completed: t.Completed, LastScrape: t.LastScrape, } diff --git a/templates/view.html b/templates/view.html index 2c8f96ac..d3e76365 100644 --- a/templates/view.html +++ b/templates/view.html @@ -54,6 +54,9 @@

{{.WebsiteLink}}


{{end}} +

{{T "seeders"}} | {{T "leechers"}} | {{T "completed"}}

+

{{.Seeders}} | {{.Leechers}} | {{.Completed}}

+