New NowPlaying and Skip detection implementation

This commit is contained in:
Deluan
2016-03-23 10:06:26 -04:00
parent 59a0ab3793
commit c580a4199e
8 changed files with 127 additions and 91 deletions
+1 -8
View File
@@ -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