From ab778e442ac0384dd8963979c32bfb09c256cfa1 Mon Sep 17 00:00:00 2001 From: Guillaume Horel Date: Sun, 11 Dec 2016 18:56:28 -0500 Subject: Correctable can now be stored --- data.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'data.go') diff --git a/data.go b/data.go index 3327ca4..065e891 100644 --- a/data.go +++ b/data.go @@ -87,7 +87,8 @@ func (store *SqlStore) GetPassword(name string) (string, error) { func (store *SqlStore) PutScrobbles(scrobbles []Scrobble) { for _, s := range scrobbles { - store.Exec("INSERT INTO scrobbles VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", + if _, err := store.Exec( + "INSERT INTO scrobbles VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", s.Artist, s.AlbumArtist, s.TrackName, @@ -98,6 +99,8 @@ func (store *SqlStore) PutScrobbles(scrobbles []Scrobble) { s.Chosen, s.Mbid, s.Session, - ) + ); err != nil { + fmt.Printf("error : %v\n", err) + } } } -- cgit v1.2.3-70-g09d2