Update `updated_at` field when modifying the playlist

This commit is contained in:
Deluan 2020-06-09 07:55:35 -04:00
parent 82d437f004
commit 29c7513879
1 changed files with 3 additions and 0 deletions

View File

@ -1,6 +1,8 @@
package persistence
import (
"time"
. "github.com/Masterminds/squirrel"
"github.com/deluan/navidrome/log"
"github.com/deluan/navidrome/model"
@ -162,6 +164,7 @@ func (r *playlistTrackRepository) updateStats() error {
upd := Update("playlist").
Set("duration", res.Duration).
Set("song_count", res.Count).
Set("updated_at", time.Now()).
Where(Eq{"id": r.playlistId})
_, err = r.executeSQL(upd)
return err