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"
|
"fmt"
|
||||||
"github.com/valyala/fastjson"
|
"github.com/valyala/fastjson"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
"net/url"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
@ -261,9 +262,10 @@ func (node *Node) CreatePlayer(guildID string, sessionID string, event VoiceServ
|
||||||
//
|
//
|
||||||
// See the Lavaplayer Source Code for all valid options.
|
// See the Lavaplayer Source Code for all valid options.
|
||||||
func (node *Node) LoadTracks(query string) (*Tracks, error) {
|
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 {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|
Loading…
Reference in New Issue