dougscripts.com

December 8 2011 - 4:37 pm

Thousands of Empty Playlists?

I've been hearing of an iTunes Match glitch that somehow or another creates thousands of empty playlists. Here's a script that will delete every empty playlist:

tell application "iTunes"

set y to (get index of last user playlist)

repeat with i from y to 1 by -1

try

set thisPlaylist to user playlist i

if special kind of thisPlaylist is none then

if not (exists track 1 of thisPlaylist) then

delete thisPlaylist

end if

end if

end try

end repeat

end tell

It may time-out because the number of actions it has to perform is so large. Just run it until the empties are gone.

Site contents © 2001 - 2024 (that's right: 2001) Doug Adams and weblished by Doug Adams. Contact support AT dougscripts DOT com. About.
All rights reserved. Privacy.
AppleScript, iTunes, iPod, iPad, and iPhone are registered trademarks of Apple Inc. This site has no direct affiliation with Apple, Inc.
The one who says "it cannot be done" should not be interrupting the one who is doing it.