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",
|
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"
|
||||||
|
|
Loading…
Reference in New Issue