Chibimagic's Weblog

AppleScript ♥ iTunes podcasts ♥ improvement!

Posted on: March 12, 2009

I realized that the other solution was less than ideal. Every time I downloaded a new podcast or listened to an old one, all the tracks would change, and they would all have to be recopied to my iPhone. So! New! Improved! AppleScripting!

tell application "iTunes"
my setTrack("Mac OS Ken", 1)
my setTrack([Apple podcast 1], 2)
my setTrack([Apple podcast 2], 2)
...
my setTrack([Trivia podcast n-1], 8)
my setTrack([Trivia podcast n], 8)
end tell

on setTrack(theTitle, trackCount)
tell application "iTunes"
set trackList to (every track in playlist "(Podcasts)" whose album is theTitle)
repeat with aTrack in trackList
set track number of aTrack to trackCount
end repeat
end tell
end setTrack

Every category of podcast gets the same priority, and this makes it a lot easier to read and modify. Win!

Leave a Reply

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

WordPress.com Logo

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

Google photo

You are commenting using your Google 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


  • None
  • Marketing Consultant: You're an great writer. You have brought up some really interesting insights. Just wanted to say fantastic blogs! I know tons of people see your write
  • optical franchise opportunities: Right now it looks like Wordpress is the preferred blogging platform out there right now. (from what I've read) Is that what you are using on your blo
  • startup speaker: Interesting content. A magnificent article. It is very informative and you are obviously very knowledgeable in this area.

Categories

%d bloggers like this: