var username = "marc2003";var api_key = "my_api_key";var artist = fb.TitleFormat("$replace(%artist%,&,'%'26)").EvalWithMetadb(g_metadb);var track = fb.TitleFormat("$replace(%title%,&,'%'26)").EvalWithMetadb(g_metadb);var url = unescape(encodeURIComponent("http://ws.audioscrobbler.com/2.0/?method=track.getinfo&api_key=" + api_key + "&username=" + username + "&artist=" + artist + "&track=" + track));xhttp = new ActiveXObject("Microsoft.XMLHTTP");xhttp.open("GET",url,false);xhttp.send();
POST /2.0/?method=track.love&track=Come%20To%20Me&artist=Bj.rk&api_key=REMOVED&api_sig=REMOVED&sk=REMOVED HTTP/1.1User-Agent: foo_softplaylistsHost: ws.audioscrobbler.comContent-Length: 0Cache-Control: no-cacheHTTP/1.0 403 ForbiddenDate: Thu, 03 Dec 2009 08:23:35 GMTServer: Apache/1.3.39 (Unix)X-Proxy-Fix-Up: headers fixed upX-Web-Node: www185Connection: closeContent-Type: text/xml; charset=utf-8;<?xml version="1.0" encoding="utf-8"?><lfm status="failed"><error code="13">Invalid method signature supplied</error></lfm>
Hey Johan, could you briefly explain what the Recursion Limite does?
the server responses for my script all work as expected. just to be clear - this only happens when the artist or title has special characters in - very strange. i fully understand if you don't have time to look into this - afterall your component works perfectly when my script isn't running. but i'd really like to run the 2 side by side if i can.
Quote from: marc2003 on 03 December, 2009, 03:43:09 AMthis only happens when the artist or title has special characters. your component works perfectly when my script isn't running.At the moment I can't really see what the problem could be. Maybe it has omething to do with the connections to or the service provided by Last.fm. The really strange thing is that it only happen for special chars.
this only happens when the artist or title has special characters. your component works perfectly when my script isn't running.
marc2003, you might want to provide the packet capture in the raw binary format
var api_sig = md5("api_key" + api_key + "artist" + artist + "methodtrack.lovesk" + sk + "track" + track + secret);var url = "http://ws.audioscrobbler.com/2.0/?method=track.love&track=" + track + "&artist=" + artist + "&api_key=" + api_key + "&api_sig=" + api_sig + "&sk=" + sk;
For some reason the data is sended non UTF encoded and then it fails. But why does it do that?
DWORD value = CP_UTF8; InternetSetOptionA(hInternet, INTERNET_OPTION_CODEPAGE, &value, sizeof(value)); InternetSetOptionA(hInternet, INTERNET_OPTION_CODEPAGE_PATH, &value, sizeof(value)); InternetSetOptionA(hInternet, INTERNET_OPTION_CODEPAGE_EXTRA, &value, sizeof(value));
Windows XP with SP2 and Windows Server 2003 with SP1: This flag is not supported.Version: Requires Internet Explorer 7.0.
yup, working fine. many thanks for your efforts. it's now running it complete harmony with my script. using WSH panel mod i've created a button that runs your component and then immediately queries the track.getinfo service to pull the playback stats and "loved" status and writes it to my file tags.