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.
NEW: Export Files From Playlists
Export Files From Playlistsplaylists, pluralwill export copies of the files of the tracks in a selection of playlists to a single user-selected folder.
More information and download is here.
UPDATED: This Tag That Tag v3.4
This Tag That Tag v3.4 will assist with swapping, copying, and appending data between two user-chosen tags in selected tracks or tracks in the selected playlist:
Swap - swap data between tags, ex: ARTIST<->COMPOSER
Copy - copy data from one to another tag, ex: ARTIST->COMPOSER ARTIST
Append - append data from one tag to the end of another, ex: ARTIST->COMPOSER - ARTIST
Prepend - prepend data from one tag to the beginning of another, ex: ARTIST->ARTIST - COMPOSER
The latter three actions also provide an option to delete the info from the first tag after the copy.
This latest version adds "Category", "Description" and "Episode ID" text tags as options and a few minor tweaks and adjustments.
More info and download is here.
Apple Releases iTunes v11.1.4
Apple has released iTunes 11.1.4 which lets you see your Wish List in the library, improved languages support and unspecific "stability improvements".
UPDATED: Track Down Purchases v2.3
Track Down Purchases v2.3 will examine each track in the entire iTunes libraryor a selection of tracksfor 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.
UPDATED: File Renamer v2.4
File Renamer will rename the files of the selected tracks (or the files of the tracks in the selected playlist) with a filename pattern that is formulated using the tracks' tag data. Optionally, export a copy of the files to a chosen location and rename the files in that location.
This latest version supports literal bracket characters (ie: [ and ]) and provides a [play order] pattern "field" which will match the index of each selected track in its sorted order.
More information and download is here.
UPDATED: PDF Adder v4.2
PDF Adder is a collection of two scripts (it used to be three) that assist with adding PDF files to iTunes as "digital booklet" PDF tracks. Each provides a method for easily supplying Author (artist), Album, Category (genre), Year, Rating and Description tag data which is then applied to the newly-added PDF track entry:
- Add as PDF to iTunes is a PDF Service workflow that, when installed, will be available in the PDF pop-up menu of the Print Dialog. It allows you to save the current document as a PDF file (from any application that uses the Print Dialog) and add it to iTunes.
- PDF Adder is an applet/droplet that will let you choose or drag-and-drop an existing PDF file and add it to iTunes. It can be installed in iTunes' Scripts folder for easy access from iTunes Script menu.
Each script displays a panel like this so you can provide tag data for the PDF:
Anything you can print, you can export as a PDF...and any PDF can be added to iTunes.
These latest versions are updated for compatibility with OS X 10.9. I also got rid of PDF Dropper and just made PDF Adder launch via double-click (or Script menu launch) or by drag-and-drop. Finally, Add as PDF to iTunes will use applicable tag data for the PDF metadata tags Title, Author, Keywords (Category/Genre tag) and Subject (Description tag).
I almost included an option to add PDFs to iBooks (see below, "iBooks is Not Scriptable. Much.") but iBooks ignores PDF metadata except for Author and of course prevents "tag" editing in the app itself. You can drag PDFs from iTunes to iBooks and the name and artist/author tags will be copied to Title and Author correctly, but that's insufficient for me. I prefer the bevy of tags available for PDF tracks in iTunes.
Deal-breaker for some: under Mavericks, with iBooks installed, PDFs added to iTunes are put in the Music library. Under earlier OS's, iTunes puts them in Books or Audiobooks.
More information and download here.
Search iTunes Store via Google
Kirk had a tip about using Google to search the iTunes Store in his Macworld column today. Here's a script for that:
try
set searchText to text returned of (display dialog "Search the iTunes Music Store for:" default answer "")
tell application "Finder" to open location "http://www.google.com/search?q=site:itunes.apple.com " & searchText
end try
Launch and enter some search text and click the "OK" button. A new window with Google results will be displayed by your default browser.
iBooks is Not Scriptable. Much.
iBooks is built without AppleScript support so I'm still using iTunes to manage my PDFs. But if you need to programmatically add a filelike a PDFto iBooks you can use this trick, where filePath is an alias:
using terms from application "iTunes"
tell application "iBooks" to open filePath
end using terms from
Unfortunately, you can't edit the tags in iBooks. Nor does iBooks seem to use any existing PDF metadata except "Author". Strangely, in fact, it uses the PDF's file name (without extension) for "Title" instead of checking the PDF's metadata for "Title". And while I'm making wishes, "Keyword" metadata could be parsed for a Category and perhaps a way could be found to use the PDF "Subject" metadata as a description tag somewhere.
iBooks, which seems to me to be a pretty basic database manager, stores much more metadata for other types of books (have a look at ~/Library/Containers/com.apple.BKAgentService/Data/Documents/iBooks/Books and the Books.plist there) so it doesn't seem like it would be much of a bother to accommodate PDFs a little better.