dougscripts.com

January 2024

December 26 2011 - 2:07 pm

NEW: Delete All Lyrics

It's often interesting to look through the search queries this site gets to see what people are looking for. Over the past few months the phrase "delete all lyrics" has been showing up pretty frequently. Don't know why it is—seems like it wasn't so long ago the phrase "find song lyrics" was more prominent. Fads! Who can predict 'em?

I already have a script that will delete the lyrics of a selection of tracks. But this would be rather slow if you used it against every track in the library. So I've posted Delete All Lyrics. This is a Cocoa-AppleScript applet (for OS 10.6 and 10.7 only) that will fairly quickly go through all the tracks in the "Music" playlist and delete the lyrics. So whether you're tired of trying to sing-along or just need to clear out some bytes, it should do the trick.

December 19 2011 - 2:05 pm

Album Art on Your ATV2

Correspondent Dave Reynolds was dismayed that he could no longer enjoy watching cover flow album art "dance" across the TV while enjoying his music. To his chagrin, the Apple TV 2 no longer has the screen saver that displays floating album art. So, he used Save Album Art to Album Folder to export his album art as files to a chosen folder (like ~/Pictures/iTunes Art/) and then pointed the Apple TV (ATV: Settings > Screen Sharing > Photos > Computers > the Computer to Use) to use that folder as a screen saver (iTunes: Advanced > Choose Photos to Share). Party on, Dave.

December 17 2011 - 11:20 am

TIP: Your iTunes Match Scheme Leaves Duplicate Files

If you are using iTunes Match to update your music to the higher-quality Store stuff you may run into a duplicate file problem if you don't Trash the original files first. For example, I've got an album of MP3s I ripped in 2002 at 128K and now want the 256K AACs that I can download with iTunes Match. The trick here (explained by Macworld's Jason Snell) is to delete the tracks and Trash the files from iTunes, but not from the cloud. Then I can click the tracks' cloud icon to download the new files from the Store. However, if I don't Trash the files they will remain in my iTunes Media folder heirarchy and when the new AACs are downloaded I'll have the original MP3s alongside the new AACs.

But, if you get yourself into this situation you can easily find and remove the files that are no longer in your iTunes library (but which are still in your iTunes Media folder) with Music Folder Files Not Added. This app will list the files in your designated iTunes Media folder which are not in your current iTunes library so that you can Trash them (or add them, if you like).

December 13 2011 - 10:07 am

iTunes Match AppleScripting Notes Redux

iTunes 10.5.2 appears to fix some issues I was seeing regarding AppleScripting and iTunes Match. In 10.5.1, AppleScript occasionally wouldn't recognize that a track had "morphed" from shared track to file track—say, after downloading a file from the cloud—and visa versa without restarting iTunes. This is fixed and AppleScript detects the change of class immediately.

Also, attempting to delete an iTunes Match file track from the library will no longer elicit the alert dialog requiring confirmation to remove the track from the cloud; the track will simply remain in the library as a shared track and will remain in the cloud. Its file remains in its original location (although its local file path can be retrieved via the track's location property and used to move, Trash or rm the file if necessary). For obvious security reasons, AppleScript cannot delete a track from the cloud or completely delete an iTunes Match track from iTunes. This kind of removal can only be done manually by the user.

I should note that a script probably should remove the file when deleting an iTunes Match track from the library (that is, library playlist 1; deleting from an ordinary user playlist simply removes the track from the playlist, as expected). Otherwise, re-downloading the file from the cloud will create a duplicate file.

On another note entirely, I'm seeing artwork now appearing again as a track's file's Finder icon. Since iTunes 10.4 artwork behavior has been—as one tweet to me put it—"hinky" in this regard. I don't pay much attention to artwork so this may have been fixed in 10.5.1 or perhaps is an iTunes Match phenomenon.

More as it develops.

(UPDATE: Several Correspondents have reported that artworks were showing up as Finder icons again as of 10.5.1.)

December 12 2011 - 10:40 pm

iTunes 10.5.2 Is Available

Apple posted iTunes 10.5.2 today with improvements to iTunes Match (not sure which specific issues have been addressed yet) and a fix for an CD audio distortion issue.

December 12 2011 - 11:37 am

UPDATED: Update Expired Podcasts v2.2 (and launchd project)

iTunes will stop updating a Podcast subscription if you haven't played at least one of its episodes in five days. Update Expired Podcasts v2.2 will go through every Podcast subscription and update it so you don't have to manually update each one individually.

This latest version adds a routine that checks to see if iTunes is running before proceeding with updating the Podcasts. Now, you may be asking yourself: if I'm running the script from the iTunes Script menu then why would the script need to check if iTunes is already running? Because: I'm going to show you how to regularly launch the script automatically and invisibly in the background and you may not want iTunes to run when the script fires. If you're not familiar with launchd then read on.

(more…)

December 8 2011 - 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.

December 7 2011 - 11:31 am

UPDATED: Restore Artwork from Album Folder v2.1

Restore Artwork from Album Folder v2.1 will look for an image file in the parent folder of each selected track's file—presumably its "Album" folder—and apply the data from that image file as artwork for the track.

This latest version addresses an issue whereby the script stalls when no image file is found and logs folders without image file to Console.

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