Comments by Andrew Wilkinson on scripts

5 comments

Comment on:
Last.fm Chart Changes

Jul 25, 2008

Hi,

The last three months should be working - I can see it fine on your page. I'm waiting to see if Last.fm starts putting the chart changes back on the last 7 days chart, if they don't do it soon then I will update the script so it adds it.

Cheers,
Andrew

Comment on:
Last.fm Chart Changes

Feb 14, 2006

I disabled the overall chart changes for a few days while I rewrote the server side script as the load from all you Last.fmers was bringing it down :-(

I have changed it to use a database rather than a directory of files and things appear to be running smoothly now :-)

Enjoy!
Andrew

Comment on:
Last.fm Chart Changes

Jan 17, 2006

Every time someone visits a user's page my server stores a copy of the charts as they are on that day. The script then compares the current chart to the newest stored chart that is at least 30 days old. If noone visits your userpage for a few days then the charts aren't stored so the date to which the charts are compared against may be longer that 30 days ago.

I can't do anything to do with when the charts were generated as Last.fm don't provide that information in their xml data. I chose 30 days because that gives quite a big time for changes, however I do admit that if you're a new user to Last.fm then the charts change a lot. It's a tricky balance to make.

HTH,
Andrew

Comment on:
Last.fm Chart Changes

Jan 4, 2006

I've updated the script here to work with FireFox 1.5. That'll fix the problems with DOMParser.

I'm working on bringing indiegigs.co.uk back up, something odd happened over Christmas and I've only just had a chance to investigate it.

Comment on:
Last.fm play statistics!

Oct 17, 2005

Below is a patch that makes the script use the 'stats reset on' date if available.

--- 1843.user.js 2005-10-17 13:41:28.000000000 +0100
+++ stats.user.js 2005-10-17 13:38:53.000000000 +0100
@@ -70,7 +70,11 @@
if (!tracksplayed)
return;

-var reg_date = panel.getElementsByTagName("p")[0].innerHTML.match(/Registered on (.*)/)[1];
+var reg_date_match = panel.getElementsByTagName("p")[0].innerHTML.match(/Stats reset on (.*)/);
+if(!reg_date_match) {
+ var reg_date_match = panel.getElementsByTagName("p")[0].innerHTML.match(/Registered on (.*)/);
+}
+var reg_date = reg_date_match[1];
var reg_date_ms = Date.parse(reg_date);
var now = new Date();