Disable completely external scrobblers if feature is disabled (DevEnableScrobble)

This commit is contained in:
Deluan
2021-06-23 10:28:45 -04:00
committed by Deluan Quintão
parent f4ddd201f2
commit 99be8444d3
3 changed files with 10 additions and 3 deletions
+1 -3
View File
@@ -6,7 +6,6 @@ import (
"encoding/hex"
"encoding/json"
"fmt"
"io/ioutil"
"net/http"
"net/url"
"sort"
@@ -184,8 +183,7 @@ func (c *Client) makeRequest(method string, params url.Values, signed bool) (*Re
}
defer resp.Body.Close()
body, _ := ioutil.ReadAll(resp.Body)
decoder := json.NewDecoder(strings.NewReader(string(body)))
decoder := json.NewDecoder(resp.Body)
var response Response
jsonErr := decoder.Decode(&response)