We really enjoy having the Mac Mini in our entertainment center to play music and videos with FrontRow. There was is one problem with our setup. I only purchase, or rip music on my laptop. When I want to add music to the Mac Mini's iTunes, I need to mount the laptop's drive on the mac mini, and then manually add the tracks to iTunes, with VNC or with the bluetooth keyboard
I decided to write an applescript to automate this. So with the applescript posted below, I am able to sit on my laptop, and "send" tracks to the Mac Mini.
- Create a playlist in iTunes that contains all of the tracks that have already been copied to the other computer. (Or the ones you don't want copied over)
- Create a smart playlist that contains all of the tracks that are not in the above playlist. (I also don't include any track with "Podcast" as the genre, as the remote mac can manage downloading podcasts)
- On the remote mac mount the "local" mac's hard drive, and create a alias to the drive. (You should also store the password needed to mount the drive in the keychain)
- Modify the applescript below to include the names of the playlists created on the "local" mac, and the path to the alias created in step 3.
- On the remote mac, in the Sharing Preference Panel, enable "Remote Apple Events"
- Make sure that in the Advanced tab of the remote iTunes, that "Copy files to iTunes Music folder when adding to library" is checked
Then when you run the script, it will ask you to select iTunes and Finder on the remote mac. (Make sure that iTunes is already running.)
This is what the script will do:
- Tell the remote mac to mount the local mac's drive
- Gather the path to all of the tracks in the smart playlist.
- Tell the remote iTunes to add the tracks to it's library
- Tell the local iTunes to move the tracks to the "already copied playlist"