diff options
| author | Guillaume Horel <guillaume.horel@gmail.com> | 2016-12-11 18:56:28 -0500 |
|---|---|---|
| committer | Guillaume Horel <guillaume.horel@gmail.com> | 2016-12-11 18:56:28 -0500 |
| commit | ab778e442ac0384dd8963979c32bfb09c256cfa1 (patch) | |
| tree | 137db20b23f06c2b9d80ba6fdfc829de0386add8 /data.go | |
| parent | 8d6525e381f23b2335dc2b86282baf2147dd900c (diff) | |
| download | lastfm-api-ab778e442ac0384dd8963979c32bfb09c256cfa1.tar.gz | |
Correctable can now be stored
Diffstat (limited to 'data.go')
| -rw-r--r-- | data.go | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -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) + } } } |
