mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-03 20:47:35 +03:00
Make SmartPlaylists to always be seen as changed for Subsonic clients.
This commit is contained in:
parent
ba067667c9
commit
a984bbbc7a
1 changed files with 6 additions and 1 deletions
|
@ -5,6 +5,7 @@ import (
|
|||
"errors"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/navidrome/navidrome/log"
|
||||
"github.com/navidrome/navidrome/model"
|
||||
|
@ -170,7 +171,11 @@ func (api *Router) buildPlaylist(p model.Playlist) *responses.Playlist {
|
|||
pls.Duration = int32(p.Duration)
|
||||
pls.Public = p.Public
|
||||
pls.Created = p.CreatedAt
|
||||
pls.Changed = p.UpdatedAt
|
||||
pls.CoverArt = p.CoverArtID().String()
|
||||
if p.IsSmartPlaylist() {
|
||||
pls.Changed = time.Now()
|
||||
} else {
|
||||
pls.Changed = p.UpdatedAt
|
||||
}
|
||||
return pls
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue