Tidy the next announce tracker status field

This commit is contained in:
Matt Joiner 2017-08-17 01:18:18 +10:00
parent e34681d5d5
commit 11aabc5a85
1 changed files with 3 additions and 4 deletions

View File

@ -26,11 +26,10 @@ func (ts *trackerScraper) statusLine() string {
fmt.Fprintf(&w, "%q\t%s\t%s", fmt.Fprintf(&w, "%q\t%s\t%s",
ts.url, ts.url,
func() string { func() string {
// return ts.lastAnnounce.Completed.Add(ts.lastAnnounce.Interval).Format("2006-01-02 15:04:05 -0700 MST") na := time.Until(ts.lastAnnounce.Completed.Add(ts.lastAnnounce.Interval))
na := ts.lastAnnounce.Completed.Add(ts.lastAnnounce.Interval).Sub(time.Now())
na /= time.Second
na *= time.Second
if na > 0 { if na > 0 {
na /= time.Second
na *= time.Second
return na.String() return na.String()
} else { } else {
return "anytime" return "anytime"