I made my program to generate charts for any date range from LastFM data available to anybody a few weeks ago and it’s had a positive response, being included on build.last.fm as an interesting extra kindofthing. Though still nobody has feedback or suggestions. Maybe in itself it’s relatively complete and I should think of other, related bits and pieces. Anybody?
I’ve made it automatically updating, so you only need to add your data once the very first time you visit, and after that it’ll check whether there should be new charts available. Maybe it should only happen a few days into the week - LastFM never get the charts out on time after all..
That and I added a few extra quick links, to 3/6/12/24 months previous. No more ‘wait a month for charts to refresh’ ;-). I should totally see if I can make this into a greasemonkey script..
PHP’s strtotime function is no end of brilliance - strtotime("-6 months") and strtotime("last sunday") are genius conceptions.
17 Comments
Excellent facility. This is what I have wanted last.fm to do in the first place. Cheers.
Cool.
How about Unicode support? I can’t view foreign characters on this.
Oh thanks for bringing that up, MR.
I like this script, would be nice if there were smaller versions that could be added to your user profile page for example =)
1) nice script :)
2) feature request: could you include the total number of tracks played in the selected timeframe somewhere in the output?
3) I think you should say somewhere that it’s based on weekly charts… just to clearify.
4) bug: i occasionally get this message:
Couldn’t read file: data/m2wester/weekly_charts/1174219200-1174824000.xml
however when I display the same chart a second time, it’s gone.
No. 2 is a good idea, I’ll add that :-)
As for 4. - some weekly charts have errors on Last.fm’s side .. the type I can’t do anything about. Then sometimes something goes wrong when the script is pulling the data. Perhaps I should add a note about it to the description.
The error here is corrected, I’ll make it automatic when my exams are over
Thanks for the comments!
Hi there, this looks pretty neat!
One question though: since I found this as an article of the Greasemonkey group, would it be possible to have this work as a greasemonkey script? that would make this utility work from a users page, I don’t know about others, but I think I would like it myself.
Hmm, I can’t seem to add my data for some reason. I get these errors:
Warning: file_get_contents() [function.file-get-contents]: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /var/www/aradnuk/troublewithdreams.com/scrobbler/user.php on line 37
Warning: file_get_contents(http://ws.audioscrobbler.com/1.0/user/perfectstorm/weeklychartlist.xml) [function.file-get-contents]: failed to open stream: Connection refused in /var/www/aradnuk/troublewithdreams.com/scrobbler/user.php on line 37
Warning: Invalid argument supplied for foreach() in /var/www/aradnuk/troublewithdreams.com/scrobbler/user.php on line 59
Just to let you know, it is now working for me!
This is excellent, what i’ve always wanted with last.fm. I might be being dumb I’m not sure, but could you have the same but for tracks as well as artists?
elan - maybe, if i find the time in the summer. though i’m looking forward to seeing what last.fm make of the charts come the new site design .. they’ll always be up-to-date woop
emz - not sure what that was about but glad it’s working again.
tom - yeah, that’s a cool idea, i’ll add that when i rewrite it in a week or two
Looks like I’ve discovered a bug in your program. The band 1989 is replaced by a 0. I’m guessing the same thing would happen to any band whose name is a number.
Otherwise, nice program!
Hey mate, any news on adding the tracks too yet?
This is ace. Best last.fm app I’ve seen
Hey, is it possible to do this for tracks, too? I’d like to go back and see what songs, not artists, I listened to at given time periods in the past.
Alternatively, do you know of other Last.fm tools that do this?
Thanks!
It’s almost there, promise!
Hey again,
MASSIVE thanks for this project now with tracks - its an amazing tool, does exactly what I need :)
Tom
Post a Comment