Skip to content

Commit

Permalink
fix(ytdm): default to localhost IP
Browse files Browse the repository at this point in the history
resolves #639
  • Loading branch information
JanDeDobbeleer committed Apr 20, 2021
1 parent b0709e6 commit 7ad764c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/docs/segment-ytm.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
2 changes: 1 addition & 1 deletion src/segment_ytm.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/segment_ytm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down
2 changes: 1 addition & 1 deletion themes/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
}
Expand Down

0 comments on commit 7ad764c

Please sign in to comment.