Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove port from default MPD_HOST warning #45

Conversation

naglis
Copy link
Contributor

@naglis naglis commented Jan 8, 2024

Right now, if both MPD_HOST and MPD_PORT environment variables are not set, you would get two warnings, e.g.:

[2024-01-08T08:54:08Z WARN blissify] Could not find any MPD_HOST environment variable set. Defaulting to 127.0.0.1:6600.
[2024-01-08T08:54:08Z WARN blissify] Could not find any MPD_PORT environment variable set. Defaulting to 6600.

where the port 6600 is repeated in both messages. This can be misleading in case the user has only MPD_PORT set to e.g. 6601 - the user would get the first warning:

[2024-01-08T08:54:08Z WARN blissify] Could not find any MPD_HOST environment variable set. Defaulting to 127.0.0.1:6600.

but blissify would be acutally connecting on the 6601 port, which would be misleading.

Also, in the code, the port is not being set when MPD_HOST is not set.

Right now, if both `MPD_HOST` and `MPD_PORT` environment variables are
not set, you would get two warnings, e.g.:

> [2024-01-08T08:54:08Z WARN  blissify] Could not find any MPD_HOST environment variable set. Defaulting to 127.0.0.1:6600.
> [2024-01-08T08:54:08Z WARN  blissify] Could not find any MPD_PORT environment variable set. Defaulting to 6600.

where the port 6600 is repeated in both messages. This can be misleading in case the user has only `MPD_PORT` set to e.g. 6601 - the user would get the first warning:

> [2024-01-08T08:54:08Z WARN  blissify] Could not find any MPD_HOST environment variable set. Defaulting to 127.0.0.1:6600.

but blissify would be acutally connecting on the 6601 port, which would be misleading.

Also, in the code, the port is not being set when `MPD_HOST` is not set.
@Polochon-street
Copy link
Owner

Makes sense - that's also mpc's behavior. Thanks for submitting :)

@Polochon-street Polochon-street merged commit ae6b4ac into Polochon-street:master Jan 8, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants