dougscripts.com

Archive for the
‘Managing Playlists’ Category

August 7 '17 - 9:19 am
NEW: Divvy Up A Playlist

I don’t burn CDs much anymore these days. Sad! So when a Correspondent inquired if a script could be written to split up a very long playlist into CD-sized “sub-playlists”, I fuzzily recalled (and Kirk confirmed) that iTunes will ask for additional blank CDs if a single CD is insufficient; such a script would be unnecessary.

But then I thought that there might be other reasons to split up a large playlist into smaller playlists. Say, for example, one wanted to limit the CD contents to only 60 minutes. Or, forget about burning CDs (which, I guess, I have), maybe smaller playlists would be convenient for one’s listening regimen.

So I wrote the script anyway. It was a fun Sunday morning project yesterday.

Divvy Up A Playlist will copy the tracks of a selected user-created playlist in their Play Order to a series of new, smaller playlists each set to a maximum time length and each named with a user-supplied base name and number suffix incremented sequentially. Additionally, the new playlists can all be moved to a new Playlist Folder, like so:

These particular playlists contain local file tracks as well as remote iCloud Music Library tracks, so I couldn’t really burn CDs from them. But whenever I want to listen to my Rolling Stones collection in 74 minute chunks I’m all set (the script can create “sub-playlists” limited in size from 30 to 120 minutes; 74 minutes is the size of a typical CD).

Divvy Up A Playlist is for macOS 10.10 and later and free to use with a donation nag. More information and download is on this page.

[UPDATE; Many thanks to the first downloaders who reported a bug in v1.0. Quickly patched!]

June 14 '17 - 10:53 am
UPDATED: Merge-Delete Playlists v5.1

Merge-Delete Playlists will allow you to merge the track contents of two or more playlists to a new or existing playlist or delete any number of playlists at once, including Smart, Genius, and Playlist Folder playlists. The merge feature will prevent the same tracks that may appear in different source playlists from being duplicated and has an option to delete original playlists. The delete feature only deletes playlists; tracks, of course, remain in the library.

This latest version brings back Apple Music playlists detection; the last version removed this ability because I hadn’t worked out all the details on how to handle them properly. They will appear with their names italicized at the top of the list in the window. It also fixes a bug that prevented selecting empty Playlist Folders.

Merge-Delete Playlists is free to use full-featured for ten days, thereafter requiring a registration code which can be purchased in-app for $1.99. It can be downloaded from this page.

June 9 '17 - 7:06 am
The Next Track, Episode 56 – Playlists in iTunes

Kirk and I go deep on playlists in iTunes in this week’s episode of The Next Track podcast. Real deep.

This episode is sponsored by Audio Hijack from Rogue Amoeba. If you can hear it on your Mac, you can record it with Audio Hijack. Download a free trial of Audio Hijack and be sure to check out a special offer for The Next Track listeners in this week’s episode.

You can listen to the episode at The Next Track website here or subscribe here in iTunes to make sure you get all future episodes.

May 31 '17 - 3:38 pm
UPDATED: Delete Empty Playlists v3.0

I have just updated Delete Empty Playlists to v3.0. The previous version would simply delete any empty playlists it found. But I frequently found that I wanted to keep a few, especially if they were Smart playlists with criteria that would just be a pain to re-create.

This latest version can, certainly, delete all the empty playlists it finds. But it can also delete just the ones that are selected in the list. Additionally, specific playlists can be isolated by filtering for specific text in their names.

Delete Empty Playlists is free to use with a donation nag and is available to download from this page.

November 19 '16 - 11:06 am
Refresh Smart Playlist Scripts

I still like me them Smart Playlists, arguably one of the best features of iTunes. I mostly use them for organizing and sorting purposes. For example, I have a bunch that segregate tracks by various iCloud Status. But I also maintain a handful that I actually play. And sometimes it’s advantageous to refresh them by removing all their tracks and letting them repopulate with different tracks. These sorts of Smart Playlists use “Live updating” and “Limit to” settings in their criteria—iTunes will prevent the removal of tracks from a Smart Playlist if it contains all the tracks from the library that meet its criteria.

Anyway, here’s one new and one updated script to assist with refereshing Smart Playlists:

Refresh Selected Smart Playlist v1.0 will remove the tracks from a single Smart Playlist selected in iTunes. It works effortlessly when you assign it a keyboard shortcut.

Refresh Smart Playlists v2.0 has been resurrected from a version I had abandoned. It’s an applet that will display all the user-created Smart Playlists in iTunes so you can select the ones you want to batch-refresh:

Both are free to download and use, but a donation for my efforts will always leave you with a satisfied feeling afterwards.

September 14 '16 - 10:26 am
UPDATED: Loved Playlists v1.2

Loved Playlists will enable you to view the Love/Dislike status for “loveable” iTunes playlists and batch-edit these settings for one or more playlists at a time.

Apple has not provided a means to see what playlists have been Loved/Disliked; you’d have to click the ellipsis menu (“…”) or contextual menu (right-click anywhere in the playlist header) to see if Love is checkmarked or Dislike has a minus sign.

This latest version allows the Love/Dislike status of Playlist Folders to be changed. Pre-12.5.1 versions of iTunes had a bug that prevented this with AppleScript.

August 16 '16 - 8:48 am
NEW: Loved Playlists v1.0

The only time you can see if a Playlist has been Loved is to view it in Playlist View, whereby a heart icon will appear in the upper right corner of the browser window. So here’s an applet, Loved Playlists, that will list all the “loveable” playlists (plain, Smart and Folder) and display the appropriate icon (it will also accommodate the Dislike feature available in iTunes 12.5, currently in beta.):

As you probably have noticed, there is also an option to batch-edit these settings for one or more selected playlists.

Loved Playlists is free to download, with a donation requested. It is for OS X 10.10 (Yosemite) and later only.

February 17 '16 - 7:24 am
Name New Playlist From Selection

(This a repost from October 25, 2011. The previous post reminded me of it.)

I use the iTunes File > New > Playlist from Selection command a lot to create temporary playlists. Actually, I use the Shift-Command-N shortcut more often than clicking the command in the File menu. But I’m irritated at all the dancing I have to do to name the new “untitled playlist”. It takes my attention away from what I was intending to do with the tracks. So, I rigged the script below to the keyboard shortcut Shift-Command-N—and, luckily, it works. Sometimes assigning a shortcut that iTunes is already using doesn’t override the original command. The script does exactly what “Playlist from Selection” does except now I can enter the name for the playlist before it’s created.

Here’s the script:

tell application id “com.apple.iTunes”

try

set sel to selection

set theSource to container of view of front browser window

if sel is {} then error

set opt to (display dialog ¬

“Make new playlist from selected tracks named:” default answer ¬

“” with title “Name New Playlist From Selection” with icon 1)

set newName to (text returned of opt)

if newName is “” then error

on error

return

end try

set newPlaylist to (make new playlist at theSource with properties {name:newName})

repeat with t in sel

try

duplicate t to newPlaylist

end try

end repeat

reveal newPlaylist

end tell

I named it “Name New Playlist from Selection”, saved it to ~/Library/iTunes/Scripts/ and gave it the shortcut using these instructions.

February 10 '16 - 7:21 am
NEW: New Playlist from Selection to Folder

New Playlist from Selection to Folder will create a new playlist with the selected tracks in a chosen Playlist Folder—rather than at the top level where you’d otherwise have to locate it and drag it to a Playlist Folder.

Just select some tracks and then launch the script (you could assign the script a keyboard shortcut).

Enter a name to use for the new playlist and click “Continue…”. A second panel listing the current Playlist Folders in iTunes will appear:

Select a Playlist Folder from the list and click “OK”. The new playlist containing copies of the selected tracks will be created in the Playlist Folder.

More info and download is on this page.

February 4 '16 - 1:39 pm
UPDATED: Show In Playlists v1.4

Show In Playlists is a stay-open applet that monitors iTunes and detects when library tracks have been selected and then displays a heirarchical list of the playlists containing the selected track(s) (emulating iTunes’ “Show In Playlist”).

Show In Playlists

It can also be set to monitor only playing tracks (excepting “For You” and “New” Apple Music, alas). Clicking a playlist in the list chooses it in iTunes, and if a single track had been selected then it will be selected in the chosen playlist. Additionally, the monitoring routine can be toggled off temporarily so that the current list of playlists remains fixed yet still selectable.

This latest version fixes a problem resolving old and new-style iTunes Library.xml data which may have caused playlists to display erroneously.

Show In Playlists is free to use for ten days and $1.99 thereafter. This is a free update for registered users. More information and download is on this page.

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