fix(ytdm): default to localhost IP

resolves #639
This commit is contained in:
Jan De Dobbeleer 2021-04-20 21:35:22 +02:00 committed by Jan De Dobbeleer
parent b0709e68b3
commit 7ad764ceee
4 changed files with 4 additions and 4 deletions

View file

@ -38,4 +38,4 @@ Remote Control password.
- paused_icon: `string` - text/icon to show when paused - defaults to `\uF8E3 `
- stopped_icon: `string` - text/icon to show when paused - defaults to `\uF04D `
- track_separator: `string` - text/icon to put between the artist and song name - defaults to ` - `
- api_url: `string` - the YTMDA Remote Control API URL- defaults to `http://localhost:9863`
- api_url: `string` - the YTMDA Remote Control API URL- defaults to `http://127.0.0.1:9863`

View file

@ -84,7 +84,7 @@ type track struct {
func (y *ytm) setStatus() error {
// https://github.com/ytmdesktop/ytmdesktop/wiki/Remote-Control-API
url := y.props.getString(APIURL, "http://localhost:9863")
url := y.props.getString(APIURL, "http://127.0.0.1:9863")
body, err := y.env.doGet(url + "/query")
if err != nil {
return err

View file

@ -38,7 +38,7 @@ func TestYTMStringStoppedSong(t *testing.T) {
}
func bootstrapYTMDATest(json string, err error) *ytm {
url := "http://localhost:1337"
url := "http://127.0.0.1:9863"
env := new(MockedEnvironment)
env.On("doGet", url+"/query").Return([]byte(json), err)
props := &properties{

View file

@ -1425,7 +1425,7 @@
"type": "string",
"title": "API URL",
"description": "The YTMDA Remote Control API URL",
"default": "http://localhost:9863"
"default": "http://127.0.0.1:9863"
}
}
}