Archive for the ‘Managing Tracks’ Category

July 13 '14 - 3:43 pm
UPDATED: Not In Any Playlist v2.0

I don’t necessarily encourage using playlists as longer-than-semi-temporary organizers. In fact, you could trash all my playlists right now and I wouldn’t care. But if the thought of doing that on your own library makes your spine melt at about L5 then you might have OCD want to try meditation Not In Any Playlist.

This applet will scan iTunes for tracks that are not assigned to any user-created playlists and display them. Includes options to export the list as a text file, ignore Smart playlists, ignore non-Music tracks, and copy selected tracks to a new or existing iTunes playlist.

Not In Any Playlist is free to try full-featured for 10 days. More info and download here.

June 24 '14 - 9:36 am
NEW: Unfinished Podcast Episodes

My Podcasts library is littered with episodes I started playing with good intentions but abandoned. For a while, I was just keeping the 3 most recent episodes and the older unfinished episodes could take a hike in a black hole. But that’s only satisfactory if the episodes happen to be time-sensitive. I’ve got a batch of evergreen episodes that I want to evaluate, but only if I haven’t finished listening to them.

Unfinished Podcast Episodes will scan the Podcasts library (media tracks in other libraries that may be podcasts will be ignored) for episodes that have not finished playing and copy them to a playlist named “[-Unfinished Podcast Episodes>”.

The script detects that an episode’s bookmark-time value—the position at which it was paused or stopped—is less than its duration. The bookmark time will be set if an episode is set to “Remember playback position”, the default setting for downloaded podcast episodes. .

More information and download is here.

June 4 '14 - 1:39 pm
NEW: Track CPR

iTunes will let you re-associate a file with a single selected dead track.

This really is the safest way for iTunes to do this. The user approves a one-to-one correspondence with a user-selected track and a user-chosen file. If an error choosing the correct track/file pair is made, the user made it, not iTunes. Still, being able to point an album’s or artist’s worth of dead tracks at a folder of corresponding files seems like it would be a simple task, though in practice perhaps not always one-hundred percent fool-proof.

I’ve been putting off building something like that for a long time because of the fool-proof factor. It’s restrictive and awkward to make a one-size-fits-all tool without including a lot of options to account for idiosyncratic ambiguities that ultimately may generate more support issues—to put it politely—than I would like to handle.

With compromise and limitations in mind, I’m posting Track CPR, a script that assists with batch re-associating files with dead tracks.

And, in the interest of avoiding as many support issues as possible it’s somewhat narrowly focused; while this script will do a lot of the work for you, it can’t make a lot of decisions for you. Therefore you may find it tedious.

But not as tedious as clicking the “Locate” button 200 times:

So here’s how it works:
(more…)

May 24 '14 - 11:26 am
UPDATED: List MIAs v3.2

List MIAs v3.2 checks your entire iTunes library for missing and presumed dead tracks—those tracks that iTunes is unable to associate with a file and which are listed in iTunes with a “!”—and displays them allowing you to delete them from iTunes or export a text file listing them by alleged File Path (if available), Song Name, Artist and Album, which you can view using TextEdit.

This latest version auto-saves the window and columns sizes (this is kind of awkward to do with Cocoa-AppleScript) and has other minor performance tweaks.

More information and download is here. If you use it and like it a donation would be greatly appreciated.

March 28 '14 - 9:57 am
NEW: Playlists By Volume v1.0

Had to round up some files located on disparate drives, but iTunes tracks can’t be sorted using any file path information.

Playlists By Volume will sort the tracks of your iTunes library into discrete playlists based on the volume name of each track’s file’s location.

Takes about a minute per thousand tracks to complete.

More information and download is here.

February 13 '14 - 12:42 pm
NEW: Scan For Double Entries

A funny thing started happening shortly after the introduction of iTunes 11 a few months ago. I began getting reports from Correspondents about usually reliable scripts that weren’t working correctly. After closer scrutiny, we were able to determine that some of their media files were appearing twice in the library. That is, they were finding pairs of identical tracks in the “Music” library that each pointed to the same file. Like this:


Two “Music” track entries, same file.

This is not ever supposed to happen. iTunes should not allow a file in a unique location to be added to its library more than once.

Now, this is not the same effect as copying a library track two or more times to a playlist, whereby only one library track is involved. Nor is it the same as when iTunes appends a number to a filename to distinguish it from an earlier-added same-named file. Nor do these tracks seem to be a flavor of iTunes Match duplicates (iTunes Match may or may not be a factor in their appearance). This issue manifests as sets of two distinct library track entries, each having different IDs and both having the same value for the Location property.

I don’t know how this happens. But it definitely has something to do with moving media files around the wrong way and doing so with iTunes 11. It may be a bug and it may even be fixed by now. But I don’t know. I only got it to happen once myself while I was experimenting convolutedly with a different issue and I haven’t been able to replicate it since.

Regardless of how these pairs came to be, how now to find them and then to deal with them? If you have a very large library, you may not even notice if you have any faux pairs.

My duplicate removal apps, Dupin and Dupin Lite, can detect this condition but won’t attempt to delete any files. If the file of one of the tracks were deleted, well, then neither track would be pointing to a file any longer and you’d have a lot of dead tracks. There’s a trick to using Dupin to delete an arbitrary one of each of the track pairs, but, technically, they’re not the sort of “dupes” that Dupin wants to handle.

So, the applet Scan For Double Entries simply looks through your library for track entries that have the same file path (that is, the same file location) and will copy these pairs of tracks to a discrete playlist so you can sort them out yourself. Presumably you’ll want to delete one of the tracks in each faux pair and I’m not sure that’s something you want an automated tool to do for you, you know, automatically.

More information and download is here.

December 28 '13 - 3:04 pm
UPDATED: Track Down Purchases v2.3

Track Down Purchases v2.3 will examine each track in the entire iTunes library—or a selection of tracks—for items purchased from the iTunes Store (audio, video, and audiobooks) and then sort them by either the purchaser’s name or account ID into discrete playlists, eg: “Purchased by Tom Ryan” or “Purchased by tomryan@email.com”.

Purchaser information is gleaned by examining the track’s local file (purchase info for iTunes Match tracks in the cloud is inaccessible and cloud tracks will be ignored), which, depending on file location and access speed, may take as long a second per track. Just sayin’.

This lateset version fixes a problem for some OS X 10.9 users whereby the script would hang once engaged.

More information and download is here.

November 29 '13 - 12:12 pm
UPDATED: Copy Tracks to Multiple Playlists v2.2

Copy Tracks to Multiple Playlists v2.2 will copy the selected iTunes tracks to one or more chosen playlists.

This latest version makes some tweaks for compatibility with OS X 10.9.

More info and download here.

November 6 '13 - 8:18 am
Add Files in Reverse, Sort by Date Added

A Correspondent writes that he sorts his Music library playlist by Date Added and meticulously adds each new album’s worth of files to iTunes in reverse order—one file at a time—so that an album will appear in order (well, the order established for them in the Finder); older tracks appear sorted lower in the Music library playlist than newer tracks. Get me?

Predictably, Our Correspondent is dismayed by the drudgery of this method and inquires if AppleScript can provide any relief. AppleScript provide relief from drudgery? Ahoy!

tell application “Finder”

set selectedFiles to selection

repeat with i from (length of selectedFiles) to 1 by -1

my addFile(item i of selectedFiles)

delay 1

end repeat

end tell

to addFile(aFile)

tell application “iTunes”

try

add aFile as alias

end try

end tell

end addFile

Save this as a Script Bundle—named whatever you like—to your ~/Library/Scripts/ folder. This will make the script available in the system-wide Scripts menu at the right side of the menu bar. Select the files in the Finder you want to add, which have been sorted in the order you want, and launch the script. It will add the files to iTunes in reverse order so that when they are sorted by Date Added in iTunes they appear in the order you had for them in the Finder.

UPDATE November 11, 2013: Added 1 second delay in repeat loop to prevent tracks from having the same date added (to the second) and sorting arbitrarily.

October 17 '13 - 7:27 am
UPDATED: Track Down Purchases v2.2

Track Down Purchases v2.2 will examine each track in the entire iTunes library—or a selection of tracks—for items purchased from the iTunes Store (audio, video, and books) and then sort them by either the purchaser’s name or account ID into discrete playlists, eg: “Purchased by Tom Ryan” or “Purchased by tomryan@email.com”.

This latest version changes the name of each playlist created (prefixing it with “Purchased by”) so that they’ll sort together and also fixes an issue with misreading account ID data that produced garbled text in the playlist names.

More info and download here.

Site contents © 2001 - 2014 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.