jeromeof
Member
Now that the WiiM Ultra with its lovely screen is finally getting into peoples hands, I think its time that we got this simple change to the WiiM handler of RadioParadise. The 'Now playing' screen when playing Radio Paradise should show proper album art
So its very simple - the Radio Paradise now playing API looks like this:
where chan can be 0, 1, 2 or 3 (depending on the radio paradise channel, e.g. 0 = DEFAULT, 1 = MELLOW etc)
This call results in a simple JSON structure like this :
Then the cover is obviously at that URL but maybe some simple decoding is needed
Then this cover is that URL: https://img.radioparadise.com/covers/l/B000DN5VJY.jpg
So its very simple - the Radio Paradise now playing API looks like this:
JavaScript:
https://api.radioparadise.com/api/now_playing?chan=1
where chan can be 0, 1, 2 or 3 (depending on the radio paradise channel, e.g. 0 = DEFAULT, 1 = MELLOW etc)
This call results in a simple JSON structure like this :
JSON:
{"time": 132,
"artist": "KT Tunstall",
"title": "Other Side of the World",
"album": "Eye to the Telescope",
"year": "2004",
"cover": "https:\/\/img.radioparadise.com\/covers\/l\/B000DN5VJY.jpg",
"cover_med": "https:\/\/img.radioparadise.com\/covers\/m\/B000DN5VJY.jpg",
"cover_small": "https:\/\/img.radioparadise.com\/covers\/s\/B000DN5VJY.jpg"
}
Then the cover is obviously at that URL but maybe some simple decoding is needed
JavaScript:
function decodeURL(url) {
return url.replace(/\\/g, '');
}
const url = "https:\\/\\/img.radioparadise.com\\/covers\\/l\\/B000DN5VJY.jpg";
const decodedURL = decodeURL(url);
console.log(decodedURL); // "https://img.radioparadise.com/covers/l/B000DN5VJY.jpg"
Then this cover is that URL: https://img.radioparadise.com/covers/l/B000DN5VJY.jpg