Archive for the ‘unix’ Category
Inspired by this recent Mac OS X Hint, I’ve posted Have a Quick Look. This script uses the UNIX qlmanage command to display a Quick Look window of the selected iTunes track(s), which can be audio, video, and, perhaps most usefully, PDF, whereby Preview.app is not necessary. Need I add that a keyboard shortcut makes this very handy.
If you find the new iTunes 9 feature “Home Sharing” a bit lacking then you may be interested in this remote management compendium I put together a few months ago. If you’re ready to really get your hands dirty with things like ssh, rsync, launchd, and more, you can design a system to copy/backup/add any iTunes files to other iTunes apps on your network in the background.
I’ve added a Part 5 to DIY: Remote Management Assortment that describes how to create and delete playlists on a remote user’s iTunes with ssh and osascript. If you haven’t been following along in this series of projects, you may want to start at the beginning; this newest addition builds on routines and concepts from earlier in the series.
DIY: Remote Management Assortment is a tutorial suggesting several methods of manipulating iTunes files among users on a network, with particular emphasis on using AppleScript to swing passwordless ssh, rsync, scp, osascript, and other utilities. Rather than develop a batch of scripts for you to download (and have to support), you can use the fundamentals described here as the basis for your own AppleScript projects.
After playing around with the “show-library-playlist” setting, it looks like you do have to set “hide-library-playlist” also. So, to show the “Library”, run these two commands in Terminal one after the other (that is, press Return after entering each):
defaults write com.apple.iTunes show-library-playlist -bool TRUE defaults write com.apple.iTunes hide-library-playlist -bool FALSE
To hide the Library again, run the same commands, but reverse the TRUE/FALSE values.
I’m not certain if this has been mentioned anywhere–I haven’t seen it–but I found the defaults command for displaying the entire iTunes library. Remember when you actually had a large playlist named “Library”, before Apple split it up into–what I call–”Master” libraries of “Music”, “Movies”, “Podcasts”, and so on? The “Library” listed everything in your iTunes library. Well, you can get that back using this command in Terminal:
defaults write com.apple.iTunes show-library-playlist -bool TRUE
Quit iTunes before entering the command. When you restart you’ll have a new playlist named “Library” at the top of your Source list, above “Music”.
If you want to remove the “Library” again, use this command in Terminal:
defaults write com.apple.iTunes show-library-playlist -bool FALSE
There is a second preference called “hide-library-playlist”, which I at first thought would have to be set in tandem with the opposite of “show-library-playlist”, but this doesn’t seem necessary. In fact, you can set one or the other, apparently, and get the desired result; that is setting “show-library-playlist” to TRUE or setting “hide-library-playlist” to FALSE amounts to the same thing. Also, for AppleScript purposes, this playlist can be referenced as library playlist 1; it always could be, but now it is visible.
This hint at Mac OS X Hints describes a simple terminal defaults command that allows iTunes to accept half-star ratings by drag or inter-star-clicking.
This tip at Mac OS X Hints reveals the defaults command to keep track numbers from being added to the beginning of filenames after importing, a feature that was removed from iTunes’ Preferences in iTunes 8. Of course, as one commenter laments, this won’t remove the track numbers from files you have already ripped in iTunes 8.
Switch off the iTunes 8 Genre browser via a defaults write command in Terminal.
Now that iTunes doesn’t rip or convert AACs using constant bit rates (see this MacFixIt article), users of Join Together can’t take advantage of the Pass-through option, which encodes the final joined file much faster. Rip AAC Old School is an AppleScript wrapper for the command line tool afconvert. It will rip CD tracks as AAC using Constant Bit Rate (CBR) so that ripped tracks will all have the same bit rate. I tested it pretty thoroughly here, but I’m still keeping my fingers crossed.