mirror of
https://github.com/navidrome/navidrome.git
synced 2026-11-04 01:08:54 +01:00
New NowPlaying and Skip detection implementation
This commit is contained in:
parent
59a0ab3793
commit
c580a4199e
8 changed files with 115 additions and 79 deletions
|
|
@ -38,13 +38,6 @@ func (c *MediaAnnotationController) Scrobble() {
|
|||
} else {
|
||||
t = time.Now()
|
||||
}
|
||||
skip, err := c.scrobbler.DetectSkipped(playerId, id, submission)
|
||||
if err != nil {
|
||||
beego.Error("Error detecting skip:", err)
|
||||
}
|
||||
if skip {
|
||||
beego.Info("Skipped previous song")
|
||||
}
|
||||
if submission {
|
||||
mf, err := c.scrobbler.Register(playerId, id, t)
|
||||
if err != nil {
|
||||
|
|
@ -53,7 +46,7 @@ func (c *MediaAnnotationController) Scrobble() {
|
|||
}
|
||||
beego.Info(fmt.Sprintf(`Scrobbled (%s) "%s" at %v`, id, mf.Title, t))
|
||||
} else {
|
||||
mf, err := c.scrobbler.NowPlaying(playerId, id, username, playerName)
|
||||
mf, err := c.scrobbler.NowPlaying(playerId, playerName, id, username)
|
||||
if err != nil {
|
||||
beego.Error("Error setting", id, "as current song:", err)
|
||||
continue
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue