0

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.

  • 1
    A link can be useful, but many users won't go through a whole tutorial to understand what you're trying to do. Could you please edit your question and add: 1) the steps you're following or 2) the code you're trying to modify and need help with. – David Apr 6 at 21:36
  • Can you please split your sentence into more than one? – Ingo Apr 6 at 21:47
  • @David Ok, got it. – Rob Roberts Apr 6 at 21:50
0

I am not writing your code for you, but this answer should put you on the right track.

  1. start chromium and specify a URL:

chromium-browser https://i.scdn.co/image/f1cd8b95970f06d4593d0cc8822011b4c0bebde4

The python program could start chromium using os.system or something similar.

  1. 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.png Unfortunately image viewer won't open in fullscreen from the command line, so I would use mirage. sudo apt install mirage Once it's installed you can open the image in fullscreen with mirage: mirage -f image.png

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.