AppleScript: Fixing tags of free music podcasts in iTunes

I’m a bit of a free music junkie. Free as in beer (or doughnuts, since I don’t like beer) is good, free as in speech is better, but this post is about the free as in doughnuts kind, which costs nothing until you get a taste for doughnuts and then end up buying out the whole Krispy Kreme, travelling around the world to have different doughnuts with different people, and getting too fat for your iPod. Download free music responsibly, kids (okay, I guess the beer metaphor would have made more sense.) Anyway, back to free music. One way I discover a lot of music is through podcasts which regularly publish individual songs. However, I use iTunes, and iTunes gives podcast tracks the name and artist given in the podcast feed (often taken from the title of a blog post) over whatever was set in the ID3 tags of the mp3 file itself. This might be a good idea for non-music podcasts, and maybe some music podcasts, where the details aren’t necessarily filled out, but for some of the music podcasts I subscribe to it doesn’t really work out. Particularly if there’s a blog post associated with each podcast episode, the title tends to include the artist name and sometimes some other information.

I can’t be bothered fixing all of the tracks manually, so a few years ago I wrote a few AppleScripts to fix up the metadata of the music podcasts I was subscribed to, and also add the tracks to my Songs playlist (which I use as the basis of most of my smart playlists) and turn off the ‘Remember position’ and ‘Skip while shuffling’ options that are turned on by default for podcast tracks. I’ve since subscribed to and made scripts to fix a few more music podcasts, and it occurred to me that other people might find the scripts useful, so I’ve just tidied up the code and added a way to choose which playlist to add the tracks to. There are links to the scripts and related podcasts below.

All of these scripts do the following things:

  • Ask which playlist(s) you want to add the tracks to. If you have a playlist called Songs, it will be selected by default. You can select nothing if you don’t want to add the tracks to a playlist, or press Cancel if you decided not to do anything after all.
  • Go through all the selected tracks you have selected in the frontmost iTunes window. I have smart playlists containing the tracks from certain podcasts which aren’t already in my Songs playlist, so it’s easy to select the tracks that need the script run on them.
  • Fix the track names and artists. This differs according to the script. Eventually I’ll make one big script that goes through all your podcasts and fixes each one appropriately, so you don’t even have to select anything, but for now each podcast has a separate script.
  • Add the tracks to the selected playlist(s).
  • Turn off ‘Remember position’ for these tracks.
  • Turn off ‘Skip While Shuffling’ for these tracks.
I recommend putting them in your iTunes Scripts folder, and then when you’re in iTunes you can just select them from the script menu and they’ll do their thing. If you’re not using a Mac, you’re out of luck.

Here are the scripts. Please let me know if there’s another music podcast you’d like a script for, or one you’ve written a script for, or one which one of these scripts already works for. I’ll add them all here and then more people can enjoy more music.

Or just get the whole Box folder of them. That’s all for now, but feel free to suggest or make changes (either to the function or form of the code; I admit to not being an AppleScript expert, and I was lazy about some of the variable names) or other music podcasts. I’ll update this post and probably subscribe to the podcasts, junkie that I am. If you tell me that there’s some easy setting somewhere to do this all automatically in the case where the mp3s in the podcast already had the information filled out correctly (apart from using a different podcast downloader or music player; I have reasons for using iTunes but I don’t want to get into a debate about that here), well, at least this post will be a useful list of music podcasts. Have fun listening!

, , , , , , , ,

  1. Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: