mirror of
https://github.com/navidrome/navidrome.git
synced 2025-06-13 05:42:24 +03:00
Update updated_at
field when modifying the playlist
This commit is contained in:
parent
82d437f004
commit
29c7513879
@ -1,6 +1,8 @@
|
|||||||
package persistence
|
package persistence
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"time"
|
||||||
|
|
||||||
. "github.com/Masterminds/squirrel"
|
. "github.com/Masterminds/squirrel"
|
||||||
"github.com/deluan/navidrome/log"
|
"github.com/deluan/navidrome/log"
|
||||||
"github.com/deluan/navidrome/model"
|
"github.com/deluan/navidrome/model"
|
||||||
@ -162,6 +164,7 @@ func (r *playlistTrackRepository) updateStats() error {
|
|||||||
upd := Update("playlist").
|
upd := Update("playlist").
|
||||||
Set("duration", res.Duration).
|
Set("duration", res.Duration).
|
||||||
Set("song_count", res.Count).
|
Set("song_count", res.Count).
|
||||||
|
Set("updated_at", time.Now()).
|
||||||
Where(Eq{"id": r.playlistId})
|
Where(Eq{"id": r.playlistId})
|
||||||
_, err = r.executeSQL(upd)
|
_, err = r.executeSQL(upd)
|
||||||
return err
|
return err
|
||||||
|
Loading…
x
Reference in New Issue
Block a user