Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Refresh Smart Playlists in iTunes using AppleScript Apps
A healthy discussion on smart playlists over at the Apple iTunes forum has yielded this tidy little piece of AppleScript, which refreshes a specific list of smart playlists (as long as they have "live updating" checked):
set playlist_list to {"list", "of", "smart", "playlists"}
tell application "iTunes"
  repeat with the_playlist in playlist_list
    delete (tracks in (first playlist whose name is the_playlist))
  end repeat
end tell
Thanks to this script, I can, for example, set up a cron job to refresh my twenty iPod-synched, genre-based, random playlists once a week. Note that this script does not play nice with static (i.e. non-smart) playlists, and it plays best with those which have the options "limit to" (selected by "random") and "live updating" selected.
    •    
  • Currently 3.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (4 votes cast)
 
[8,130 views]  

Refresh Smart Playlists in iTunes using AppleScript | 1 comments | Create New Account
Click here to return to the 'Refresh Smart Playlists in iTunes using AppleScript' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Refresh Smart Playlists in iTunes using AppleScript
Authored by: magir on May 25, '04 10:31:22AM

As a sidenote the third generation of iPods finally updates playlists "in real time", so you usually don't need to use iTunes to update them. Too bad that this feature never made its way into the earlier iPods, its essential for Audiobooks. Simply make a playlist with "play count = 0" and after a file has been played it vanishes from the list, so you only have to listen to it once. With first and second generation iPods you have to connect the iPod, activate iTunes (and I guess you also have to click once on the playlist).



[ Reply to This | # ]