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:
Deluan Quintão
2025-06-24 08:50:06 -04:00
committed by GitHub
parent e5e2d860ef
commit aab3223e00
4 changed files with 164 additions and 8 deletions
+2 -8
View File
@@ -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 {