Archive for the ‘Last.fm’ Category

Last.fm Real Time Stats 2.0.2 is out now!

Last.fm, Musicmapper, Programming | Posted by Paul
Dec 04 2007

The latest version of Last.fm Real Time Stats is 2.0.2 as of now.
I’m leaving for Austria for four months, or so, at the end of this week, during which I’ll probably spend little time on this project. That and the fact that I’ve greatly improved things and added several new features are the reasons for this release. Moreover I’m planning on some new features that will require some database changes. It’ll close the gap between RTS and Last.fm In Time. It’ll be massive. Oh I love it all ready! :D

Well that’s for the future, this is now and there are some changes in this version:

  • You can now turn off logging and gzip compression in config.php
  • htmlentities() in statprediction.php
  • Bug: sorting between image and statprediction differs
  • Bug: Recent tracks seem not to update when a script is called.
  • Use XML data source.
  • Fix inefficiency with disconnecting before and reconnecting after recenttracker.php is called.
  • Fix low compression rates on logs.
  • Implement page counter
  • Bug: Very long artist or tracks names failed to insert. Cut off at 255.
  • Make this document HTML
  • Position are now the same for artists and track with the same playcount for image.php and statprediction.php

With compression for logging fixed you can now use it to compress your logs over 20×!
You can now safely use HTML in tags. Don’t know why you’d want that, but hey, it’s exploitable!
We now use strictly XML source files. This is good when you have comma’s in your tags. Because of this I also found a bug with extremely long tags, they’re now cut off at 255 characters.
I’ve also implemented a view counter for image.php and statsprediction.php so you can now easily see how often stats were displayed for a certain user in the all new management.php. This document shows you some statistics about the statistics, but is still far from finished!

That’s about all the interesting new stuff in here. Enjoy it and any comment is welcome!

Last.fm Real Time Stats 2.0.1 Released

Last.fm, Musicmapper, Programming | Posted by Paul
Oct 15 2007

Although I’m very busy lately, I’ve been putting some work into Real Time Stats. I’ve resolved some outstanding ToDo’s and now it’s been almost a month since the initial release, here it is: Last.fm Real Time Stats 2.0.1

Changelog:

  • fixed bug with color variable names
  • Improve Documentation massively! (actually mostly with 2.0.0…)
  • A footer include for e.g. Google analytics.
  • Parsetimes are now rounded
  • Make scripts week-parameter accept absolute week#. >1 is absolute, format WWYY, 2 digit year, 2 digit week.

That last option makes new value’s possible for the week selection. First you could only select weeks relative (e.g. 0=current, -1 last and 1 next week). Now you can do either that our enter an absolute number in the format WWYY, so 4107 would make week 41 in 2007.

What is there to be done:

  • Install script.
  • Management page.
  • Use XML data source instead of plain text.
  • Make the statprediction.php’ HTML IE compatible and HTML 4.01 strict compliant.
  • Fix low compression rates on logs. (they actually have negative compression)
  • Make a decent index.php (this is just a copy of a page from my web-site)
  • Use Mod_Rewrite
  • Use getval() function where possible
  • Fix inefficiency with disconnecting before and reconnecting after recenttracker.php is called

Real-time stats for the masses, it’s OSS

Last.fm, Musicmapper, Programming | Posted by Paul
Sep 16 2007

I’ve put some effort into Last.fm Real-time Stats this week. The Database is now fully relational. Some more bugs crushed and stuff optimized. I wanted to release it this night, yesterday, the day before yesterday and before that, but all I did was more tweaking. Now I’ve decided that I just packed the last change into the release archive.

So here it is:
Last.fm Real Time Stats 2.0.0

Download it now and generate you own real-time stats. Because, admit, you don’t like waiting until Monday to see what you listened last week! You might need some experience with scripts, this is just the first release, but I’ve put quite some effort into the readme, so I hope you’ll be fine. Server requirements are:

  • PHP 5, 4 might also work, didn’t test it. (let me know if you do!)
  • With GD-PNG and zlib (change the log functions in the bottom of the functions file if you don’t have zlib)
  • MySQL, tested on 5.0.38
  • Cron Tabs (see FAQ)
  • Apache is recommended, because I use .htaccess to secure the /inc/ dir in a case of PHP parser failure.
  • A database management utility, such as PhpMyAdmin simplifies things a lot

If anyone is going to host the script and is willing to host the script for other people as well you can leave a message in the comments.

And why it’s 2.0.0? That’s because this one is fundamentally better than the previous version.

Help Last.fm clean Metadata through fingerprinting

Last.fm | Posted by Paul
Sep 06 2007

If you’re a fanatic Last.fm user like me, you’ll probably have noticed a lot of misspelled artist names. There used to be a moderating system which allowed users to vote on merging a misspelled artist with the correct one. This system is long since gone. This doesn’t mean that the crew doesn’t want to see the problem fixed. In contrary, I know they’ve been searching for a solution for a long time now.

It’s almost there. They’ve now started collecting fingerprints of audio files. On his blog RJ announces:

Phase 1 is now underway with the first public “beta” release of our new fingerprinting technology. This will mature into a nice sexy (free) API that lets you grab clean metadata based on an audio fingerprint. For now, all that it does is send the fingerprint data to bootstrap the moderation system. [...]
What we’ll do next is figure out all the popular (mis)spellings for tracks with the same fingerprints. [...] We need people with MP3 collections (of any size/quality) to download and run the fingerprinter to make this work, so spread the word.

I think it’s a genuinely nice sollution to use this kind of data collecting tot algorithmically solve such a complex and vast problem. So get your ass up mouse moving and start fingerprinting your collection today!

Download for:
Windows
Mac OS X
Linux .deb
Source code
Or go to RJ’s blog @ last.fm

Let me remind you that it might take a while and it’s not the smoothest process, but just restart it a couple of times and you’ll get to the end just fine! (the client does remember where it go to, so it does resume!)

Last.fm Real-time Stats is going to be OSS, sometime…

Last.fm, Musicmapper, Programming | Posted by Paul
Aug 30 2007

I’ve decided that Last.fm Real-time stats is going to be open source software. It’s been in consideration for a long time now, but it’s final. And I’m ever more liking the idea. At first I was a bit scared of just giving away my hard work, but now I think it’s more than that. I think it’s key to showing what you really created. Just showing the interface doesn’t tell much about a project.

So today I was looking at some work half done:
Bad Function
Can you spot the mistake?
More is the spoiler.
Read the rest of this entry »

Last.fm in Time

Last.fm, Musicmapper, Programming | Posted by Paul
Jul 31 2007

The idea
From time to time I like to code a little PHP and the other day I was looking at the audioscrobbler (the core, the data supply of last.fm) web services for interesting feeds and I saw the week chart feeds. I noticed that they provide a list of all available weeks and quickly realized that you could combine this with the Top50 feed to reconstruct older Top50’s. Just subtract an artists play count from next week’s total play count and you have the current total play count. And hey, if you can reconstruct old Top50’s you can view how they developed and how your musical preferences developed! Read the rest of this entry »