add custom listenbrainz url support and make ui "consistent"

Co-authored-by: spezifisch <spezifisch@users.noreply.github.com>
Co-authored-by: Alex McGrath <amk@amk.ie>
This commit is contained in:
sentriz
2021-01-11 23:34:55 +00:00
committed by Senan Kelly
parent 4443d7d0f5
commit a18929ad01
8 changed files with 903 additions and 870 deletions

View File

@@ -55,8 +55,9 @@ func (c *Controller) ServeScrobble(r *http.Request) *spec.Response {
optSubmission := params.GetOrBool("submission", true)
scrobbleErrs := []error{}
for _, scrobbler := range c.Scrobblers {
err = scrobbler.Scrobble(user, track, optStampMili, optSubmission)
scrobbleErrs = append(scrobbleErrs, err)
if err := scrobbler.Scrobble(user, track, optStampMili, optSubmission); err != nil {
scrobbleErrs = append(scrobbleErrs, err)
}
}
if len(scrobbleErrs) != 0 {
return spec.NewError(0, "error when submitting: %v", scrobbleErrs)