Random Acts of Coding: Thinning out Duplicate Playlists
by Erica Sadun
Recently, my iPod has been collecting duplicate playlists like a child collects dirt. It's not an unknown problem. A bit of googling shows that others have had the same issue and as there didn't appear to be a simple solution, I decided to write a little script to take care of things. The following code deletes zombie playlists from the iPod. After, I re-sync to restore the playlists. This takes only a second because the iPod has already been synchronized before I run the script. Figlet, as you probably might guess, is the name of my iPod.
tell application "iTunes"
set Figlet to first source whose name is "Figlet"
set pls to every user playlist of Figlet
repeat with eachpl in pls
|This looks like it would solve a very prevalent and annoying problem of mine. I copy pasted this into Script Editor but when I click Run it says: Syntax Error: Can't get Jake's iPod. Access not allowed.|
|Jake, could it be the name of your iPod? Spaces and apostrophes?|
|I changed the name of my ipod to Jpod and it solved all my problems thank you so much you're a godsend!|
I just got my iPod to use with my Windows XP workstation. I do love it. What do I need to do to execute this code? I didn't know the iPod was programmable/sriptable. The duplicate playlist issue on my iPod is way bad. Please respond to my email at firstname.lastname@example.org
|Hi, I do have my IPod connected to Windows to. Now the question is, how do I get this VERY clever code to run for my IPod?|
Please help....I'm not sure what I need to do to run the script editor and fix my duplicate issue. Would you walk me through step by step? Thanks - Victoria