mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-04 04:57:37 +03:00
Change index in playlist to start from 1
This commit is contained in:
parent
3ca295c863
commit
201a22e613
2 changed files with 2 additions and 2 deletions
|
@ -87,7 +87,7 @@ func Up20200516140647UpdatePlaylistTracks(tx *sql.Tx, id string, tracks string)
|
|||
return err
|
||||
}
|
||||
for i, trackId := range trackList {
|
||||
_, err := stmt.Exec(id, trackId, i)
|
||||
_, err := stmt.Exec(id, trackId, i+1)
|
||||
if err != nil {
|
||||
log.Error("Error adding track to playlist", "playlistId", id, "trackId", trackId, err)
|
||||
}
|
||||
|
|
|
@ -112,7 +112,7 @@ func (r *playlistTrackRepository) Update(mediaFileIds []string) error {
|
|||
}
|
||||
|
||||
// Add new tracks, chunk by chunk
|
||||
pos := 0
|
||||
pos := 1
|
||||
for i := range chunks {
|
||||
ins := Insert(r.tableName).Columns("playlist_id", "media_file_id", "id")
|
||||
for _, t := range chunks[i] {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue