Skip to content

Commit

Permalink
[extapi] added clear before adding a playlist
Browse files Browse the repository at this point in the history
  • Loading branch information
DictumMortuum committed Jan 2, 2025
1 parent a428cce commit 4c0b004
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/servus-extapi/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (

func Version(c *gin.Context) {
rs := map[string]any{
"version": "v0.0.43",
"version": "v0.0.44",
}
c.AbortWithStatusJSON(200, rs)
}
Expand Down
5 changes: 5 additions & 0 deletions pkg/model/playlist.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,11 @@ func PlaylistPlay(req *Map, res *Map) error {
}
defer conn.Close()

err = conn.Clear()
if err != nil {
return err
}

err = conn.Add("playlists/" + playlist_id)
if err != nil {
return err
Expand Down

0 comments on commit 4c0b004

Please sign in to comment.