Tidy the next announce tracker status field
This commit is contained in:
parent
e34681d5d5
commit
11aabc5a85
|
@ -26,11 +26,10 @@ func (ts *trackerScraper) statusLine() string {
|
|||
fmt.Fprintf(&w, "%q\t%s\t%s",
|
||||
ts.url,
|
||||
func() string {
|
||||
// return ts.lastAnnounce.Completed.Add(ts.lastAnnounce.Interval).Format("2006-01-02 15:04:05 -0700 MST")
|
||||
na := ts.lastAnnounce.Completed.Add(ts.lastAnnounce.Interval).Sub(time.Now())
|
||||
na /= time.Second
|
||||
na *= time.Second
|
||||
na := time.Until(ts.lastAnnounce.Completed.Add(ts.lastAnnounce.Interval))
|
||||
if na > 0 {
|
||||
na /= time.Second
|
||||
na *= time.Second
|
||||
return na.String()
|
||||
} else {
|
||||
return "anytime"
|
||||
|
|
Loading…
Reference in New Issue