Now Playing backend implemented

This commit is contained in:
Deluan
2016-03-16 21:04:41 -04:00
parent 9bfb61d994
commit cc89cb5bd1
6 changed files with 49 additions and 11 deletions
+7
View File
@@ -30,6 +30,13 @@ func (c *MediaAnnotationController) Scrobble() {
c.SendError(responses.ERROR_GENERIC, "Internal error")
}
beego.Info(fmt.Sprintf(`Scrobbled (%s) "%s" at %v`, id, mf.Title, time))
} else {
mf, err := c.scrobbler.NowPlaying(id)
if err != nil {
beego.Error("Error setting", id, "as current song:", err)
c.SendError(responses.ERROR_GENERIC, "Internal error")
}
beego.Info(fmt.Sprintf(`Current Song (%s) "%s" at %v`, id, mf.Title, time))
}
response := c.NewEmpty()