mirror of
https://git.sr.ht/~phw/scotty
synced 2025-04-28 06:57:56 +02:00
Various output tweaks
This commit is contained in:
parent
e9b7aabc0a
commit
49d06b7f52
3 changed files with 9 additions and 9 deletions
|
@ -39,10 +39,10 @@ func (b DumpBackend) ImportListens(listens []Listen, oldestTimestamp time.Time)
|
|||
Count: len(listens),
|
||||
LastTimestamp: oldestTimestamp,
|
||||
}
|
||||
if result.Count > 0 {
|
||||
result.LastTimestamp = listens[len(listens)-1].ListenedAt
|
||||
}
|
||||
for _, listen := range listens {
|
||||
if listen.ListenedAt.Unix() > result.LastTimestamp.Unix() {
|
||||
result.LastTimestamp = listen.ListenedAt
|
||||
}
|
||||
fmt.Printf("Listen: \"%s\" by %s\n", listen.TrackName, listen.ArtistName())
|
||||
}
|
||||
return result, nil
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue