@@ -12,6 +12,7 @@ type Song struct {
}
type SongExternal struct {
+ Id int `db:"id" json:"id"`
TrackNumber int `db:"track_number" json:"track"`
Title string `db:"title" json:"title"`
Artist string `db:"artist" json:"artist"`
@@ -82,7 +82,8 @@ func SelectSongsByArtist(db *sqlx.DB, artist string) (songs *[]*read.SongExterna
songs = &[]*read.SongExternal{}
err = db.Select(songs, `
select
- track_number
+ id
+ ,track_number
,title
,artist
,album