Syncing the Next n Unwatched TV Shows to your iPod, AppleTV or iPhone using iTunes

Storage space on an iPhone is at a premium. There just isn’t enough space on it to be able to store an entire season of a TV Show that you’ve ripped from the DVDs you bought. But then, there shouldn’t really need to be - most people will only need or want to watch a couple of episodes of something between times that they’re able to dock with their home machine. So, it would make sense to be able to just sync the next couple of unwatched episodes of a few shows to your iPhone, iPod etc. You’d think you’d be able to just do that with iTunes, wouldn’t you? Unfortunately, out of the box you can’t.

What you can do though is run a little AppleScript voodoo that’ll do the job for you. Installing the script onto your system will take at most five minutes, and then you’ll simply have to run the script before you sync your iPhone so that it knows which episodes need syncing.

NB: Throughout this tutorial, whenever I say “iPhone” you can happily substitute in “iPod” or “AppleTV” - the principles are exactly the same and will work just as happily with these devices.

Here’s the seven step plan for what you need to do to get “next n unwatched shows” syncing on your iPhone:

  1. Download the Next n Unwatched TV Shows AppleScript.
  2. Unzip, and place the contents in ~/Library/iTunes/Scripts. If the Scripts folder does not already exist, create it.
  3. Restart iTunes to activate the AppleScript
  4. Create a new Smart Playlist called “Syncable TV Shows” in iTunes with the following parameters (substituting the Shows you want to sync):

    Match Any of the following rules:  Show is Family Guy, Show is American Dad, Show is Big Train

  5. Select “Update Next N Unwatched TV Shows” from the Scripts menu item. This will create a new playlist called “Next N Unwatched TV Shows”. Feel free to move this playlist into a playlist folder of your choice in iTunes if you want.

  6. With your iPhone connected to iTunes, select the “Video” tab (“TV Shows” tab for iPod and AppleTV) and choose the following options:

    Sync All episodes of: Selected playlists: Next N Unwatched TV Shows

  7. Finally, sync your iPhone!

Now that you’ve been through this process once, whenever you come to sync your iPhone, just run the “Next n Unwatched TV Shows” AppleScript from the iTunes Script menu before you perform the sync. As an alternative, you could set up an automated task to do this for you, but I’ll leave that as an exercise for the reader (Hint: Maybe a cron job or an automated task in iCal would be the way to go with this?)

The script is currently set up to sync the next 2 unwatched episodes of each TV Show you set up in set 4. If you’d prefer to sync a bigger or smaller number of episodes, then simply open the script file in Script Editor, change the variable “numEpisodesPerShow” from 2 to whatever number you fancy, and save.

permalink | View blog reactions

TrackBacks

TrackBack URL for this entry: http://www.workingwith.me.uk/cgi-bin/type/mt-tb.cgi/784

other relevant pages

about wwm

workingwith.me.uk is a resource for web developers created by Neil Crosby, a web developer who lives and works in London, England. More about the site.

Neil Crosby now blogs at The Code Train and also runs NeilCrosby.com, The Ten Word Review and Everything is Rubbish.