Recent Tunes Update

I’ve been working on separating and cleaning up the code I use to run the Recent Tunes area of my sidebar so that it may be made into an easily installable sidebar item for any weblog via a PHP include() statement, but have run into a slight snag. The Recent Tunes application doesn’t work in Tiger and has been sold to someone, so I have no “easy” way of getting the iTunes track data to my webserver with no foreseeable hope of it being updated. It looks like I’ll have to come up with my own solution involving AppleScript. However, AppleScript is just not a language I can work with (I can’t live without {‘s!). If anyone could suggest a simple AppleScript that would grab important data from the current iTunes track and make it available to some other scripting language (PHP would be nice), that would be fantastic. I’ll probably end up putting that AppleScript into a shell script using osascript, then formatting and uploading that data with PHP, all run via cron on my local machine. I’m open to other suggestions, though. The only thing I need is the iTunes track data in a computer-readable format uploaded onto a FTP server. The rest I can change the code to fit. When this does turn into a useable project, you’ll surely get due credit.

I’ve also got a name picked out which has no (yes, zero) results on Google right now, so it will be distinguishable from other projects out there. More on that when I have things working again. For now, I’ve disabled that section of my sidebar.

Recent Tunes Update

28 thoughts on “Recent Tunes Update

  1. iTunes calling iChat is still free, right?

    Yes. It’s actually built into Tiger now. iChat calls iTunes via AppleScript (I would imagine — it’s the only logical choice for interacting with iTunes) and sets your status to the current song in “Track – Artist” format. For people who have you on their buddy list, your name and that information shows up along with a small iTunes Music Store search link for that song, so they can click and open iTunes to preview the song you’re listening to (if iTMS has it). You can enable the iTunes track display by choosing “Current iTunes Track” from your iChat status menu or it’s Menu Extra.


  2. Matt’s right… Recent Tunes does appear to work in Tiger now for some reason. It was not working after my Tiger upgrade, but I have since done an “erase and install” and re-downloaded Recent Tunes today, all seems to be working again. I’ve enabled that part of my sidebar again (I added “&& 0” to the PHP script to disable it temporarily). Thanks for the update Matt!


  3. I’m not sure if this is Tiger related, as i’ve not used RecentTunes before this, but every so often (perhaps after iBook has been to sleep or reset) RecentTunes seems to stop seeing what iTunes is playing and just doesn’t update… Delete the config file and launch it again fixes it… A bit of a hassle though.


  4. Andrew says:

    I don’t think Recent Tunes is fully working on Tiger .. put it this way on the both two systems I have Tiger working on they both show the same thing, that they fail to notice that iTunes has updated. Sure it works the first time with a plain empty plist .. but then if I shutdown and boot up again and fire up iTunes again Recent Tunes doesn’t recognised anything has changed. To fix this I have to delete the entries in the plist and then work again.

    Anyway I contacted the author and he has no plans to make it Tiger compatiable .. maybe I guess because he has sold it ?? Anyway I had a thought that this type of function is extactly something that Synergy Advance could do .. and probably with more indepth information .. e.g. links to the iTunes music store .. Amazon etc. Anyway I dropped an e-mail at Wincent to see what he thinks


  5. Dang, just upgraded to Tiger and spent the day trying to get Recent Tunes to work. If anyone finds an alternative please post it here.

    I’d happily move to Synergy if they added an upload feature but ideally I’d like to provide an rss feed of a user’s recently played tracks. That way you can add recently played tracks to your site and provide a link to a more in-depth breakdown.

    Here’s hoping!


  6. Using the AudioScrobbler feeds would be a great option if they sent the album name in the feed along with the other information.

    I’d also like to see the artist and track separated in the XML, as opposed to an “artist – track” format. While this isn’t as big a deal as the missing album title, the possibility is there for throwing off the parser (if an artist or title has a hyphen in it).


  7. Your absolutely right, the “artist – trackâ€? format is problematic but Recent Tunes meant I had to remove all ampersands from my tags anyway.

    Also, audioscrobbler’s (recently) intermittent uptime is another problem but I’m sure that will be sorted out fairly soon. As this was the only option to get my ‘recently played’ list back online, and has the added bonus of requiring one less menu extra, I’ve made a PHP script to parse the audioscrobbler text feed.

    Download version 0.1 here:

    I’ll mail audioscrobbler when I get a chance asking if they’ll provide a feed with the album, track and artist separated into distinct xml objects.


  8. I really, really liked Recent Tunes. It did exactly what I wanted it to do – until I upgraded to Tiger. It ran almost invisibly, formats were flexible, I had my info all tied into Amazon – it was practically perfect. Now it seems to work intermittently – which is basically not at all. I don’t know how many hours I’ve spent looking at solutions for uploading iTunes info. I’ve gone through Kung-Tunes (which is now dead), ridiculous Applescripts, and finally Recent Tunes, which doesn’t work under TIger, and won’t be updated, apparently.

    I cannot BELIEVE there is no other program out there that can do what Recent Tunes does. I’ve contacted Freshly Squeezed, who confirmed that there are no plans whatsoever to touch this thing again, and I’ve read that it was actually sold to someone (?). If this is true, does anyone know who that is and what their email address is? :) I need to tell this person to crack open the code and spend a few minutes updating it!

    I don’t really feel like going the AudioScrobbler route, because I’d be dependent on their servers, etc. Recent Tunes just got my info from my local machine and uploaded it real quick, no muss, no fuss.

    Apparently, Synergy is supposed to have some sort of upload features which (I’m supposing) are undocumented. I’ll need to go their forums and see what’s going on with that program. I already own it – would be great if it could serve a dual purpose and upload my information as well.


  9. Joseph Moore says:

    Synergy Classic *can* fire off an AppleScript when a track changes, so I’m guessing some enterprising AS jock could restore much of the functionality lost with the death of RecentTunes. Somebody please take up the challenge! Hell, this is something I’d actually pay for.


  10. Quote:
    Yes. It’s actually built into Tiger now. iChat calls iTunes via AppleScript (I would imagine — it’s the only logical choice for interacting with iTunes) and sets your status to the current song in “Track – Artistâ€? format.

    Actually, it’s much more slick than that – it used distributed notifications.

    Download Meow to see what messages are being sent:


  11. Is it possible that the guy you know that did hot tunes can add an extra feature to export the Artist – Album – Track?

    It would be more than just exporting it — it would have to upload it along with album artwork if necessary. There’s some server interaction that needs to be done, and I think I may accomplish it with a Tiger widget instead.

    Actually, it’s much more slick than that – it used distributed notifications.

    Wow, that’s pretty neat. Do you know of a way to programmatically capture these notifications?


  12. Wow, that’s pretty neat. Do you know of a way to programmatically capture these notifications?

    Other than Meow, no. I wish I did. Hopefully someone will come out with an updated/better version of iChatStatus.


  13. Glad i ran across this blog… I was really sweating when RecentTunes stopped working in Tiger! Like someone else said. It did EXACTLY what i wanted it to! save the exact info i wanted saved into my own DB….

    Well like they mentioned.. I trashed preferences (saved my arguments first) and restarted RceentTunes and Viola! it worked again.. (once i put in my correct settings again)

    Thanks! Yes back in business with RecentTunes… =)


  14. Okay, I feel like I’m SO close to getting this to work- but RecentTunes either:

    a.) makes blank files when I try to use FTP (both in local directory and up on server- though it IS actually FTPing the blank file).


    b.) just doesn’t seem to connect if I use the HTTP GET. I can see the proper URL in the console- even copy and paste that in my browser and it works right- but it just isn’t calling it on its own. I’m using WordPress. Any ideas anyone?



  15. OKay, I got it writing files, but still no luck with the HTTP GET, which would be much better since the URL I’m calling grabs Amazon images and all that.



  16. Hey guys! I really loved recent tunes too. I updated to tiger and tada, it doesn’t work anymore. Where can i find the prefs to delete? Spotlight failed to find it… very surprising oO


  17. Tino

    Users/your username/Library/Preferences/com.freshsqueeze.recenttunes.plist

    delete that.. make sure you save your settings first so you can reenter them in without a hassle of remembering what you exactly had… =)

    Interesting note.. Mine “just stopped” working now… not sure.. i bet if i delete preferences again and restart it it will work… but not sure what triggered it to just stop recognizing what itunes was playing again.. hmmmm… i hope they fix these tiger bugs…


  18. yea so… if y’all have’nt figured it out now… :

    it seems that after ~20 or so listings by iTunes in Recent Tunes, it stop updating the track list as well as updating to your webserv, whatever method it may be.

    take a look at your system.log in “”; you’re probably going to see a message similar to:

    “2005-07-12 23:37:40.215 Recent Tunes[12212] *** NSTimer discarding exception ‘*** -[NSCFArray addObject:]: mutating method sent to immutable object’ that raised during firing of timer with target 311320 and selector ‘checkCurrentTrackID”.

    I’m not all that familiar with Mac OsX programming laguages, but it appears that “NSTimer” has disregarded the “NSCFArray addObject” as it is an “immutable object”. *shrug*.

    Hope this helps someone to fix, or at least explains to some why Recent Tunes is not working in Tiger.


  19. my bad on the last post, it is “System.log” you should look at in the “”(and sorry for the grammatical errors as this is a small box to edit in).


  20. Hey Nate, thanks for the headsup on OnDeck. I’ll have to give it a look.

    As for Recent Tunes, I’ve come accross a temporary workaround that has been working for me.
    For those interested :

    Quit Recent Tunes from the menu bar
    Open up Apples “Property List Editor.” (you must have Apples Developers Tools installed – Link for more info)
    In Property List Editor open up the Recent Tunes pref file, com.freshsqueeze.recenttunes.plist , located in your home pref folder.
    once open, look for “RT2.0SongList”. This is an Array. Click the drop down triang;e to expand this array and notice the “Dictionary” entries which are listed as 0,1,2,3 … etc
    DELETE all of these “dictionary” sub-elements.
    Quit Property List Editor and Re-Launch Recent Tunes
    Start Pumping some iTune’s and hopefully you’re good to go!

    This has worked for me now numerous times no for me, so hope fully it will for others. I’ve also noted in my experimenting that the failure of Recent Tunes seems to occur after the App itself has been Quit. I;ve Also noted that the here forementioned preference file is only written to (ie new tracks written to file) after Recent Tunes quiting…


Comments are closed.