I know I can run Chromium full screen based off of this tutorial, in kiosk mode, but I'm wondering what would I need to do to set up my pi up so that instead of just running one webpage on startup, it could change the web page that is being displayed every time the song changes, by grabbing a link from a Python script I wrote. The script gets the album art of the current song playing on Spotify (it returns a link to an image host that looks like this). I'm not very familiar with Linux so I'm not sure what this would look like. Is there a way to accomplish this within Python? Thanks.
I am not writing your code for you, but this answer should put you on the right track.
- start chromium and specify a URL:
The python program could start chromium using
os.system or something similar.
- If it were up to me, I would not use chromium to display the images. Instead I would use something lower-level:
wget https://i.scdn.co/image/f1cd8b95970f06d4593d0cc8822011b4c0bebde4 -O image.png
This would download your image and save it to /home/pi/image.png. You could then preview that image with image viewer:
gpicview image.pngUnfortunately image viewer won't open in fullscreen from the command line, so I would use
sudo apt install mirageOnce it's installed you can open the image in fullscreen with mirage:
mirage -f image.png