summaryrefslogtreecommitdiffstats
path: root/modern.go
diff options
context:
space:
mode:
authorGuillaume Horel <guillaume.horel@gmail.com>2016-12-13 21:47:52 -0500
committerGuillaume Horel <guillaume.horel@gmail.com>2016-12-13 21:47:52 -0500
commit3f3cb7c7cede379914eed51c57e58f66ffdd1856 (patch)
tree8d876ddc66060664825417b67a70ba982c8f45dc /modern.go
parent6bb509f48f20a20e16b447ddcecbf3d55a4aa0a3 (diff)
downloadlastfm-api-3f3cb7c7cede379914eed51c57e58f66ffdd1856.tar.gz
return the number of accepted and ignored scrobbles
Diffstat (limited to 'modern.go')
-rw-r--r--modern.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/modern.go b/modern.go
index 9106123..45c92bd 100644
--- a/modern.go
+++ b/modern.go
@@ -94,10 +94,10 @@ func (store *SqlStore) TrackScrobble(r *http.Request) (ApiResponse, error) {
fmt.Printf("%v\n", err)
return struct{}{}, err
} else {
- scrobbles := parseScrobbles(r.Form, session)
+ scrobbles, ignored := parseScrobbles(r.Form, session)
store.PutScrobbles(scrobbles)
return Scrobbles{Scrobbles: scrobbles,
- Attrs: Attrs{1, 0}}, nil
+ Attrs: Attrs{len(scrobbles), ignored}}, nil
}
}