Closed treatmesubj closed 3 years ago
This is a deeep rabbit hole, but the actual display rendering code mostly lives in the very root plugin- pidi_display_pil
which just handles rendering the album art, track title, etc to an image - https://github.com/pimoroni/pidi-plugins/blob/master/pidi-display-pil/pidi_display_pil/__init__.py
This is then used by pidi_display_st7789
which takes that image and displays it on an ST7789-based display: https://github.com/pimoroni/pidi-plugins/blob/master/pidi-display-st7789/pidi_display_st7789/__init__.py#L35
And this, in turn, is used by PiDi Spotify's st7789 class which makes a few tweaks to remove stuff that wont work: https://github.com/pimoroni/pidi-spotify/blob/master/pidi_spotify/st7789.py#L6
Sooooooooo... you need to grab the pidi-plugins
repository from here- https://github.com/pimoroni/pidi-plugins, tweak pidi_display_pil
and then install it with python3 setup.py install
...
Awesome! Thanks for the direction.
hm I cloned the repo and straight up deleted __init.py__
from pidi_display_pil
and then ran its setup with sudo python3 setup.py install
but pidi_spotify still seems to be working just fine. Hm. Looks like it didn't actually overwrite pidi_display_pil/__init__
in my dist-packages, so I guess I'll just do it there even though that's probably not the proper way.
Yes! In pidi_display_pil/__init__.py
in DisplayPIL.update_album_art
I just needed to comment out the Gaussian blur at line 125 and in DisplayPIL.update_overlay
I commented out the self.update_text_layer()
call in line 135.
Now the display simply shows the buttons, volume, progress bar, & album art, which is perfect for my needs
Hi, sorry this is not really an issue, I just can't seem to figure out where the code is to write the artist name, song, and album on the display. I'd like to remove it for now and just simply show the album art.
There are many classes of classes from https://github.com/pimoroni/pidi-spotify/blob/master/pidi_spotify/st7789.py to https://github.com/pimoroni/pidi-plugins/blob/fdacf9409dcfb839c49c4e7ea16fe28417bf9493/pidi-display-st7789/pidi_display_st7789/__init__.py to https://github.com/pimoroni/pidi-plugins/blob/master/pidi-display-pil/pidi_display_pil/__init__.py to https://github.com/pimoroni/pidi-plugins/blob/master/pidi-display-pil/pidi_display_pil/__init__.py
I wonder if I could make a new class of one of these and just overwrite whatever method is inevitably responsible for writing the text to the screen.
Sorry, just looking for some help. I figured it couldn't hurt to ask.
Thanks