|
Long-time readers of stormy clouds will remember when the little musical notes link above took them to a sortable, searchable list of my mp3 collection, along with a utility for querying my listening habits in terms of artists, albums, and songs. That was generated using a Winamp plugin that spit out your recently played songs into a text file, which i then uploaded periodically to my web server and interrogated with perl. When i switched from Winamp to iTunes i found that no comparable plugin existed, and hence my listening statistics went the way of the dodo.
Never say never ... i recently became aware of the iTunes COM SDK, allowing programmers to write scripts and/or standalone programs that can send/receive information to/from iTunes. I spent a little time over the weekend learning it, along with Microsoft's JScript scripting language. And today i put the finishing touches on a script that uploads songs to my web server as i listen to them, allowing the server to keep track of my listening statistics. It's even better than the Winamp method, for two reasons. Firstly, the song information is sent in real time, therefore the web interface reflects changes immediately. Second, in addition to text info (artist, track, album, etc), using XML i can also upload album artwork to the server as a base64 stream. And using the miracle of PerlMagick, the receiving perl script can resize the images to thumbnails (75x75) and store them.
I haven't listened to much since getting the new script running, but have a look!
|