Polochon-street / blissify-rs

bliss bindings for MPD.
30 stars 6 forks source link

hostnames in MPD_HOST aren't supported #49

Closed toofar closed 9 months ago

toofar commented 10 months ago

I've got MPD_HOST set to mediaserver.local. When I try to do anything with blissify it just prints Error: No such file or directory (os error 2). Setting MPD_PORT, or putting a port on the end of MPD_HOST doesn't help. I have to put an IP address in MPD_HOST. mpc, ncmpcpp and python-mpd2 etc all work fine with a hostname.

You might be able to use https://doc.rust-lang.org/std/net/trait.ToSocketAddrs.html to help parse an ip-address-or-socket-but-not-a-unix-socket. Although it seems like that requires a port on the end too, which shouldn't be required for MPD_HOST. Maybe add MPD_PORT on the end if there is no ':' in the string?

nit: also the error message could be better too, took me while to figure out what it was referring to (I couldn't even see a relevant call in strace)

Polochon-street commented 10 months ago

Hi,

Thanks for reporting :) it should definitely support proper hostnames. I made a fix, could you checkout mpd-host-actual-hostname-support and tell me if it fixes your problem? If it does, I'll merge and bump the blissify version.

Polochon-street commented 9 months ago

should be merged and published. Closing, but please reopen if it pops up again :)