mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-18 21:07:44 +03:00
Better logging
This commit is contained in:
parent
1a705d4319
commit
92682f65d8
@ -54,13 +54,14 @@ func (s *scrobbler) detectSkipped(playerId int, trackId string) {
|
|||||||
diff := np.Start.Sub(prev.Start)
|
diff := np.Start.Sub(prev.Start)
|
||||||
if diff < minSkipped || diff > maxSkipped {
|
if diff < minSkipped || diff > maxSkipped {
|
||||||
prev = np
|
prev = np
|
||||||
|
beego.Debug(fmt.Sprintf("-- Playtime for track %s was %v. Not skipping.", prev.TrackId, diff))
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
err = s.itunes.MarkAsSkipped(prev.TrackId, prev.Start.Add(time.Duration(1)*time.Minute))
|
err = s.itunes.MarkAsSkipped(prev.TrackId, prev.Start.Add(time.Duration(1)*time.Minute))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
beego.Warn("Error skipping track", prev.TrackId)
|
beego.Warn("Error skipping track", prev.TrackId)
|
||||||
} else {
|
} else {
|
||||||
beego.Debug("Skipped track", prev.TrackId)
|
beego.Debug("-- Skipped track", prev.TrackId)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user