fix(subsonic): clearing playlist comment and public in Subsonic API (#4258)
* fix(subsonic): allow clearing playlist comment * fix(playlists): simplify comment and public parameter handling Signed-off-by: Deluan <deluan@navidrome.org> * refactor(playlists): streamline fakePlaylists implementation in tests Signed-off-by: Deluan <deluan@navidrome.org> --------- Signed-off-by: Deluan <deluan@navidrome.org>
This commit is contained in:
@@ -131,14 +131,8 @@ func (api *Router) UpdatePlaylist(r *http.Request) (*responses.Subsonic, error)
|
||||
if s, err := p.String("name"); err == nil {
|
||||
plsName = &s
|
||||
}
|
||||
var comment *string
|
||||
if s, err := p.String("comment"); err == nil {
|
||||
comment = &s
|
||||
}
|
||||
var public *bool
|
||||
if p, err := p.Bool("public"); err == nil {
|
||||
public = &p
|
||||
}
|
||||
comment := p.StringPtr("comment")
|
||||
public := p.BoolPtr("public")
|
||||
|
||||
log.Debug(r, "Updating playlist", "id", playlistId)
|
||||
if plsName != nil {
|
||||
|
||||
Reference in New Issue
Block a user