What I get from raw message is something like this:
\0Music\01\0{0} - {1}\0Ghost of the Sun\0Katatonia\0Viva Emptiness\0{AA5921BB-60A7-4439-B026-6E47F1A0B0FA}\0
and NO, there is no file like AlbumArt_{AA592... with the album art.
What is that number.
What are {0} and {1} around "Music".
There must have meanings?
//edit: sorry for wrong information, I thought it only showed song and the artist.
I've written some code: have a look at this.
code:
var path="D:/Documents/My Music/";
var imgname="folder.jpg";
var name="";
var artist="";
var album="";
var id="";
function OnEvent_Initialize(MessengerStart)
{
Debug.trace("Script Start");
makedp(Messenger.MyCurrentMedia);
}
function OnEvent_Uninitialize(MessengerExit)
{
Debug.trace("Script End");
}
function OnEvent_MyMediaChange(newsong){
makedp(newsong);
}
function makedp(str){
str=str.substring(str.indexOf("{1}\\0")+5);
song=str.substring(0,str.indexOf("\\0"));
str=str.substring(str.indexOf("\\0")+2);
artist=str.substring(0,str.indexOf("\\0"));
str=str.substring(str.indexOf("\\0")+2);
album=str.substring(0,str.indexOf("\\0"));
str=str.substring(str.indexOf("\\0")+2);
id=str.substring(0,str.indexOf("\\0"));
str=str.substring(str.indexOf("\\0")+2);
Debug.trace("Artist: "+artist+", Song: "+song+", Album: "+album);
Messenger.MyDisplayPicture=path+artist+"/"+album+"/"+imgname;
}
I can't test it, probably there is an error at least somewhere, I got disconnected and can't sign in.
Don't forget to change the path to your My Music folder.