Thank you for your donation!

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Is it possible to display now playing artwork for radio streams?
"This will only work with Lumin and Kazoo"

Sorry, I missed this bit last night, my mistake.

No wonder it didn't work. I'll have to learn to comprehend what is written....
(07-08-2018, 06:45 PM)serverbaboon Wrote: Ok I  have a simple script (very little error checking)  to get the artwork for the currently playing track on Radio Paradise at the bottom of the page, I don't seem to be able to upload the file.

Once you have entered the code save it as

Transfer this file to you PI either by winscp or equivelant to /home/pi or by copying using what ever file share browser you have to \\x.x.x.x\SDCARD.

ssh to your Raspberry PI

move your file to /usr/local/bin, give the file execute permissions and test.
The stuff in brackets are notes .

cd /usr/local/bin
sudo mv /mnt/SDCARD/ .              ( or if you used scp sudo mv /home/pi/ .)
sudo chmod +x


(if you get an error about request missing)

sudo pip install requests

You need to make sure that your Radio Paradise entry in the Radio Config file for UPMPDCLI references this script, make sure the Radio Paradise section in the file /etc/upmpdcli-radio.conf looks something like this and save.

To edit type you can use nano at the terminal prompt.

sudo nano etc/upmpdcli-radio.conf

[radio Radio Paradise]
url =
artUrl =
artScript = /usr/local/bin/

You will need to restart upmpdcli or reboot the raspberry pi.

To restart upmpdcli you can type.

sudo service upmpdcli restart and press return.

One thing I have noticed is that Kazoo can be a little unstable if you are messing around stopping and starting things, plus if you leave it running when you are off wireless it has this habit of changing its default network it scans to be your telephone providers ip address which is annoying. Basically always exit Kazoo and check the wireless network before blaming Moode/UPMPDCLI.

The code is below, if you are doing this on a windows box you MUST make sure that you file editor can save in Linux format not Windows CRLF format.
The Python XML libraries have some vulnerabilities so there is a cursory attempt to make sure the xml isn't to big, this is a poor test and the vulnrabilities more sophisticated so don't use this code for anything else.

Basically Radio Paradise publish an XML file with the current track data in it, we get it with python requests take the resulting xml and search for the cove art key.

The current version of upmpdcli in Moode uses Python 2.


# Extract the artwork url for the currently playing track Radio Paradise.
# Will repeat the warning from the Python website about the lack of checking on the xml modules.

from __future__ import print_function

import requests
import xml.etree.ElementTree as etree

rpdata = ""

   StreamInfo = requests.get(rpdata, timeout=2)
except requests.exceptions.ConnectTimeout:
   if int(StreamInfo.headers['Content-Length']) > 1024:

rp = StreamInfo.text

rptree = etree.fromstring(rp)


# Uncomment the below for troubleshooting to display the XML
# print(rp)
Hi, Sorry, work has been full on so I've only just seen your script serverbaboon - many thanks for doing this.

Forum Jump: