Update podcasts and limit total size before syncing

Jan 24, '08 07:30:00AM

Contributed by: lordsandwich

If you listen to a lot of podcasts on your iPod or iPhone, you've probably spent a ton of time on iTunes manually checking for new episodes and deleting old ones before syncing, just to avoid an insufficient-space error.

The following is a one-click solution using Smart Playlists and an AppleScript:

  1. Set your device to sync only checked songs and videos, and sync all episodes of all podcasts.
  2. Create a Smart Playlist called "Included Podcasts" where:
  3. Create a Smart Playlist called "Excluded Podcasts" where:
  4. Open Script Editor and create the following script:
    set IsDone to 0
    tell application "iTunes" to updateAllPodcasts
    
    repeat until IsDone is equal to 1
      delay 3
      tell application "Finder"
        if not (exists folder "Macintosh HD:Users:YOUR_USER_FOLDER:Music:iTunes:iTunes Music:Downloads") then
          set IsDone to 1
        end if
      end tell
    end repeat
    
    tell application "iTunes"
      set enabled of every track of user playlist "Included Podcasts" to true
      set enabled of every track of user playlist "Excluded Podcasts" to false
      delay 3
      update "YOUR_IPOD_OR_IPHONE'S_NAME"
    end tell
You can save the script either into iTunes or as an app to put on the dock (my preference).

[robg adds: I haven't tested this one. In the AppleScript, you'll need to edit the path for your iTunes Music folder's Downloads folder, as well as the name of the iPod/iPhone you'd like to update.]

Comments (1)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20080118083231110