Would it be possible to store more information out of the 'Now playing data' ?
I would like to have the artwork URL in Domoticz. Goal is to use this in the Dashticz 2.0 dashboard
I assume something like this is used?
(part of my previous PHP scripting)
Code: Select all
$url = 'http://192.168.1.2:9002/jsonrpc.js';
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{"id": 1,"method": "slim.request", "params": ["b8:27:eb:37:64:93", ["status","-",1,"tags:gABbehldiqtyrSuoKLN"]]}');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
//return JSON data
echo $response;
this response also gives album art for spotify:
Code: Select all
{"params":["b8:27:eb:37:64:93",["status","-",1,"tags:gABbehldiqtyrSuoKLN"]],"result":{"player_ip":"192.168.1.201:34500","playlist_loop":[{"playlist index":0,"id":"-197226104","title":"Me & Mr Jones","artist":"Amy Winehouse","album":"Back To Black (Deluxe Edition)","duration":"153","year":"0","bitrate":"320k VBR","url":"spotify://track:0RfzQhbvtn5lOaKdhpAni7","type":"Ogg Vorbis (Spotify)","artwork_url":"https://i.scdn.co/image/5c8d379181d18fa3d95d024426fe6cfc2d29cffa","info_link":"plugins/spotifylogi/trackinfo.html"}],"remote":1,"power":1,"mode":"play","playlist shuffle":0,"playlist_timestamp":1492959201.02607,"player_connected":1,"can_seek":1,"seq_no":0,"playlist_tracks":1,"playlist repeat":0,"mixer volume":20,"time":81.4347388267517,"player_name":"Keuken","remoteMeta":{"id":"-197226104","title":"Me & Mr Jones","artist":"Amy Winehouse","album":"Back To Black (Deluxe Edition)","duration":"153","year":"0","bitrate":"320k VBR","url":"spotify://track:0RfzQhbvtn5lOaKdhpAni7","type":"Ogg Vorbis (Spotify)","artwork_url":"https://i.scdn.co/image/5c8d379181d18fa3d95d024426fe6cfc2d29cffa","info_link":"plugins/spotifylogi/trackinfo.html"},"signalstrength":0,"playlist_cur_index":"0","current_title":"Me & Mr Jones by Amy Winehouse from Back To Black (Deluxe Edition)","rate":1,"playlist mode":"off"},"id":1,"method":"slim.request"}
The artwork is stored in result.remoteMeta.artwork_url, it is a direct url to the image
response for local audio:
Code: Select all
{"params":["b8:27:eb:37:64:93",["status","-",1,"tags:gABbehldiqtyrSuoKLN"]],"method":"slim.request","id":1,"result":{"playlist mode":"off","rate":1,"signalstrength":0,"playlist_cur_index":"0","player_name":"Keuken","mixer volume":20,"time":15.008100467419,"duration":228.136,"playlist repeat":0,"seq_no":0,"playlist_tracks":15,"playlist_timestamp":1492959432.65667,"player_connected":1,"can_seek":1,"mode":"play","playlist shuffle":0,"playlist_loop":[{"playlist index":0,"id":88,"title":"Rolling in the Deep","genre":"Soul and R&B","albumartist":"Adele","composer":"Adele Adkins, Paul Epworth","trackartist":"Adele","album_id":7,"album":"21","duration":228.136,"disc":1,"disccount":1,"tracknum":1,"year":2011,"bitrate":"1412kbps VBR","albumartist_ids":"7","composer_ids":"8, 9","trackartist_ids":"7","url":"file:///volume1/Music/FLAC/Adele/21/01%20-%20Adele%20-%20Rolling%20In%20the%20Deep.flac","type":"flc"}],"power":1,"player_ip":"192.168.1.201:34508"}}
The artwork is not in? somehow the LMS browser client can show album art however....