Okay, I managed to solve the problem with the help of your script :)
My onEvent_MyMediaChange function looks like this:
code:
function OnEvent_MyMediaChange(NewMedia){
var tmp = NewMedia;
try{
tmp=tmp.split("\\0");
tmp[3]=tmp[3].replace(prefix,"");
tmp[3]=tmp[3].replace(suffix,"");
tmp[3]=prefix+" "+tmp[3]+" "+suffix;
tmp[3]=tmp[3].replace(/\s\s/g," ");
Messenger.MyPersonalMessage=prefix+" || "+tmp[4]+" - "+tmp[5]+ " || "+suffix;
setNowPlaying(false,icon,tmp[3],tmp[4],tmp[5],tmp[6],tmp[7]);
}catch(e){
if(e.number!="-2146823281"){
Debug.Trace("HANDLED: error "+e.number);
Debug.Trace("Please report any bugs to the Author at:");
Debug.Trace("http://shoutbox.menthix.net/forumdisplay.php?fid=39");
}else{
Debug.Trace("HANDLED: Array element tmp[3] does not exist. This is most likely the way the file information has been completed");
Messenger.MyPersonalMessage=prefix+" "+suffix;
}
}
}
I've only changed the underlined parts.
Thank you, Spunky, for your help and the whole mPSM script ;)
-------------------------------------------------------------------------------
I was a bit quick to say it's working...:/ Now at first it displays the PSM correctly, then it removes the song's title from the PSM...
Somehow the else branch is always triggered... Why could it be?