freshen-up smart playlists

When listening to music, I am listening to some kind off random shuffle mode 99.8% of the time. Yeah, I know, “death of the album” and all that.

Anyway, being having a bit of DJ in me (control freak?), I don’t leave it all up to iTunes to select the music. ‘Party Shuffle” and a few smart playlists (and a bit of applescript) keep a good selection of tunes flowing.

Party Shuffle pulls tracks from the full Library, or selected playlists, and is great because you can reorganize tracks on-the-fly. I will prune/delete tracks from the Party Shuffle that don’t fit my mood which queues up 20 or 30 songs. This generally works well, but the songs are a bit too random.

I decided I wanted to sprinkle the source playlist with a few favorites (anything rated 3 stars or higher), and some newly added tracks (added in the last 60 days), along with a random selection of unplanned tracks from the library. Unfortunately, you can’t build this kind of playlist with one Smart Playlist. I created the following smart playlists : 25 favorites, 25 new tracks, 150 unplayed, and a ‘Shuffle Source’ playlist which builds a single playlist using the other three as the source.

Whew! (Really, it’s not much work.)

I found that while doing my shuffle list pruning, I’d run across the same songs frequently, which makes sense - deleting the track from shuffle doesn’t remove it from the source playlists. iTunes does not have a ‘refresh smart playlists’ command, so I would need to manually refresh the 4 smart playlists. This is where my master plan starts to break down (too much work!), but luckily, Applescript comes to my rescue.

I found this bit of applescript code at macosxhints:


set playlist_list to {"list", "of", "smart", "playlists"}
tell application "iTunes"
  repeat with the_playlist in playlist_list
    delete (tracks in (first playlist whose name is the_playlist))
  end repeat
end tell

Just replace “list”, “of”, “smart”, “playlists” with the names of your favorite smart playlists, and you have a quick way to refresh smart playlists.

The results? Here is my LastFM profile, which is currently rocking an ‘eclectic score’ of 86/100, which for some reason I am proud of.

Leave a Reply

Formatting: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Other Entries

about

Hi.

My name is Bernie McGinn, and you are reading my web-based junkdrawer. I live in San Francisco, California. I work for CNET Networks as Product Manager for CNET News.com and CNET Blogs.

Last century, I played in some bands and ran a record label.

@flickr

bike rideHalloween 2008Halloween 2008Halloween 2008

@twitter

shared google reader items

caveats, disclaimers, warnings

this is my personal website. opinions expressed are mine and not that of my employer... you get the drift.