GuardKenzie / miniplayer

A curses based mpd client with basic functionality and album art.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Question] Is mpd's port hardcoded?

BachoSeven opened this issue · comments

After installing, I get :

Traceback (most recent call last):
                                    File "/usr/bin/miniplayer", line 476, in <module>
                                                                                         player = Player()
                                                                                                           File "/usr/bin/miniplayer", line 70, in __init__
                                                     self.client.connect("localhost", 6600)
                                                                                             File "/usr/lib/python3.9/site-packages/mpd/base.py", line 755, in connect
                                                                self._sock = self._connect_tcp(host, port)
                                                                                                           File "/usr/lib/python3.9/site-packages/mpd/base.py", line 716, in _connect_tcp
                                                                                   raise err
                                                                                              File "/usr/lib/python3.9/site-packages/mpd/base.py", line 709, in _connect_tcp
                                                                      sock.connect(sa)
                                                                                      ConnectionRefusedError: [Errno 111] Connection refused

From this, it looks to me like it's trying to use the default mpd port, which is 6600. However, I have it configured on port 6602 instead; could you add this through a configuration option (or ask mpd for it, not sure if that's possible)?

I could probably make a PR for this, but it's such a small change, and I'm sure you can find a smarter way to implement this than I would.

Also, I made an AUR package for miniplayer here, if you would like to add it as an installation method to the README.

Thanks in advance!

commented

This is correctly assumed and an oversight on my part. I just pushed a new version which allows you to configure both the mpd host and port.

Thank you for putting up the AUR package! I have added it to my description.