Properly encode values for identifier
This commit is contained in:
parent
fbab76d269
commit
ba67bde994
6
node.go
6
node.go
|
@ -5,6 +5,7 @@ import (
|
|||
"fmt"
|
||||
"github.com/valyala/fastjson"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
|
@ -261,9 +262,10 @@ func (node *Node) CreatePlayer(guildID string, sessionID string, event VoiceServ
|
|||
//
|
||||
// See the Lavaplayer Source Code for all valid options.
|
||||
func (node *Node) LoadTracks(query string) (*Tracks, error) {
|
||||
url := fmt.Sprintf("%s/loadtracks?identifier=%s", node.config.REST, query)
|
||||
v := url.Values{}
|
||||
v.Set("identifier", query)
|
||||
|
||||
req, err := http.NewRequest(http.MethodGet, url, nil)
|
||||
req, err := http.NewRequest(http.MethodGet, fmt.Sprintf("%s/loadtracks?%s", node.config.REST, v.Encode()), nil)
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
|
Loading…
Reference in New Issue