dougscripts.com

December 8 '11 - 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 - 2015 (that's right: 2001) Doug Adams and weblished by Doug Adams, dougscripts AT mac DOT com. About.
All rights reserved. Legal.
AppleScript, iTunes, iPod, iPad, and iPhone are registered trademarks of Apple Inc. This site has no affiliation with Apple, Inc.