That's why none of my songs have " - " in the artist name. Artists that have a hypen in the name, don't have spaces around it.
e.g.: The All-American Rejects, American Hi-Fi, blink-182. But you're right, now that I think about it, I have 2 songs that have " - " in the song title.
So I came up with this:
code:
var title = songName.readString(0,false);
artist = title.substr(0, title.indexOf(" - "));
title = title.substr(artist.length - (-3));
return {'Title': title, 'Artist': artist};
That works on songs with a " - " in the title, but not in the artist.