drgerg / mmc4w

Minimal MPD Client for Windows - No-Cloud, Local Music Library
GNU General Public License v3.0
8 stars 2 forks source link

FYI: initial issues getting mmc4w running #25

Open donburch888 opened 2 months ago

donburch888 commented 2 months ago

I have now got mmc4w running (ie windows are displaying) with a few hiccups. So far I encountered 4 issues which I mention for anyone else who might be following:

  1. Anyone insalling your package will also need to pip install python-musicpd pillow
  2. I got "Connection Refused" error ... until I discovered that in my mpd.conf I had bind_to_address set to "localhost", but in mmc4w I was trying to access the same machine by its IP address. Adding IP address to mpd.conf resolved that.
  3. By default the Art window is displayed, and the code expects the cover.png file to be in the mmc4w/code directory, but it is actually at mmc4w/code/_internal/cover.png.
  4. Having a 720x576 size screen is unreasonably small, and I needed to adjust the window coordinates. The screen geometry took a while to sortout - the screen coordinates are with 0,0 at the bottom right corner. Thus to place my main window in the top right corner, in mmc4w.ini I set ”maingeo = 510,90,510,542”

Still a lot more for me to do, particularly with accessing the MPD database and setting up playlists for my 18000+ tracks. Also issues with my audio card not having volume controls :-(

drgerg commented 2 months ago

Sounds like you're getting it all sorted out. Starting from scratch with MPD and MMC4W at the same time is definitely the hard road to take.

Don't give up! I think the learning curve is worth it.

drgerg commented 2 months ago

You may be able to resolve your player controls issue with the "software" mixer_type in mpd.conf. image

donburch888 commented 2 months ago

I previously got MPD running on a couple of other RasPis (for making voice assistant announcements), and can play music to them from Home Assistant/Music Assistant ... so not a total beginner, but I'm far from being an expert ;-) Also I was a programmer years ago, but new to linix and python.

Volume can be controlled in alsamixer, so I will definitely try the software mixer.

Thank you for developing and publishing your code; and for responding on giyhub. Much appreciated.

donburch888 commented 2 months ago

You might lke to rename the "Second level connection error" message at the end of "def connext():" to a more user-friendly "Unable to connect to mpd". In my case caused by me forgetting to restart the mpd server, or using IP address instead of localhost.

Also, alsa sofware mixer did the trick, and I like the way that adjusting volume changes the button colours :-)

I have finally got some music playing ... due mosty to me being impatient (not waiting for mpd to complete updating my 18000 tracks), and several attempts to get my playlists with the correct file pathnames. Incidentally I found and used mkpl to automate making the playlists, and note that it can also be used as a python module.

The main issue i am having now is that you seem to assume that all tracks will have 'album', 'track' ... unfortunately I have a number of singles :-( Easily fixed by inserting before each place where cs['album'] is used (mostly setting us msg):

        if 'album' not in cs:
            cs['album'] = ""

I just pressed [Pause] ... and yes it is pausing and resuming ... but I wonder why you are continuing to sleep and countdown during the pause ? I expect there is a good reason which I will figure out in time ;-)

drgerg commented 2 months ago

On "Second level connection error": the user sees this: image so I don't consider that a problem. On assuming 'album' and 'track', yes, assumptions are made. And you are responding to my assumptions in the appropriate manner; editing the code to meet your own assumptions. :-) Activity during a Pause event is related to the display which is a loop that is dependent on time when playing, and needs some of the same sort of data when paused. As to singles: in my collection, even singles have 'album' and 'track' info. Curating the collection is just part of what I do, and is also an assumption built into the software. Not everyone manages their collection, and that's fine. They should not use MMC4W because they will likely have issues. That's noted in the docs right up front. Keep going! It sounds like you're making progress.