Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Make sure iTunes mounts a networked music library Apps
There are a lot of tips here regarding using iTunes and a networked music folder. The biggest issue is iTunes changing the library's path to a default (local) path every time it is started if you forgot to mount the networked music drive first. After trying a few tricks and scripts, I noticed something really simple: when you have an alias to a resource on a network drive and click it while the drive is not mounted, OS X starts to search simply mounts the drive. So all I had to do was:
  • Go to /Applications and make an alias of iTunes.
  • Drop the newly-created alias on the network drive.
  • Copy the alias from the networked machine back to my dock. (Remove the original iTunes icon from the dock to avoid confusion!)
That's it! No script needed. If the drive is mounted, it just opens iTunes. If it's not mounted but mountable, it mounts and then starts iTunes, which will find all its files. And if the drive is not mountable (e.g. turned off), you simply get nothing (except some sort of dialog warning), which is exactly the behaviour I want.
    •    
  • Currently 4.33 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (6 votes cast)
 
[35,774 views]  

Make sure iTunes mounts a networked music library | 15 comments | Create New Account
Click here to return to the 'Make sure iTunes mounts a networked music library' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Make sure iTunes mounts a networked music library
Authored by: dan55304 on Apr 23, '07 09:16:43AM

I used to do something like this but wanted a better solution. My problems came into play when OS X had difficulty mounting the drive. In my case it was because the host IP address changed or one of the routers between me and the music was having issues. I'd get the spinning lollypop of death for a very long time until my Mac realized it wasn't going to mount the shared volume. Apple's timeout is very long and locks up your Mac.

The same was true when my Mac went to sleep and Tiger would try to re-establish communication with the music volume. I've now given up on it completely. I'm back to using a single computer managing the library and using iTunes sharing to access it.



[ Reply to This | # ]
Make sure iTunes mounts a networked music library
Authored by: taxi on Apr 24, '07 07:01:39PM

The whole sleep/wake disconnect thing bugs me too. Otherwise, everything would be hunky-dory.

Before I read this hint, I used a script to automatically mount the shared drive at startup, and then another one when waking up. At one stage I also had a script that ran every minute, and made sure the server was still connected. This was when the server was running poorly, and used to disconnect occasionally.

For me, this hint would be complete with a way to quit iTunes (nicely) whenever the machine is put to sleep.



[ Reply to This | # ]
Make sure iTunes mounts a networked music library
Authored by: rickx on Apr 25, '07 10:51:46AM
[Don't know why they anonymized my little hint...anyway]
@dan
if you have a changing IP of the computer holding the files, it's obviously a problem. A solution could be using the name instead of the IP, if somebody between you and the target can translate that (a DNS server, or through netbios).
Regarding the sleep/awake issue, I solved that too (more or less) using another cool hint. There's a tool you can download that executes a script whenever your mac goes to sleep or wakes up. Search for sleepwatcher.

[ Reply to This | # ]
Make sure iTunes mounts a networked music library
Authored by: mozart111 on Apr 23, '07 09:58:40AM

If I do this hint using my 500gb drive attached to the new Aiport n USB, can I then sync this iTunes to AppleTV? Getting all of the movies and other video off of my MacBook Pro on to the 500GB and sync. That would be great.



[ Reply to This | # ]
Make sure iTunes mounts a networked music library
Authored by: xSmurf on Apr 23, '07 01:04:20PM

This is a neat trick. I banged my head a few times on the desk thinking "why didn't I think of this before!". Thanks for pointing it out.

I hid the iTunes icon on the remote drive using
/Developers/Tools/SetFile -a V iTunes

Dan, if you are having problems with IPs one option would be to run your own DNS server. I'm not gonna go in details on this, but this is possible if you use a router with a custom firmware, or use a real machine to to route your network. Since I only have a few machines, the easiest solution for me, bind is a PITA and I hadn't heard of dnsmasq and djdns at the time, was to create a /etc/hosts file with all the domains. Of course, I have "static" dhcp declaration, so this works nicely. Maybe you could use a custom Bonjour (mDNS) entry for the remote server to broadcast it's IP when it changes.

---
MacBook Pro 2.16Ghz / 2Gb / 100Gb 7200rpm / CD/DVD±RW
PM G4 DP 800 / 1.25gb / 120Gb+80Gb / CD/DVD±RW/RAM/DL
- The only APP Smurf

[ Reply to This | # ]

Make sure iTunes mounts a networked music library
Authored by: tom larkin on Apr 23, '07 01:56:16PM

My problem is, I store most of my media on a Linux server which I built solely to store music, movies, and back up data over my network.

I seem to have issues using SMB to copy libraries and such. For some reason iTunes insists on copying every file twice.

I just use VLC and open up the directory over the network that way, and it seems to work fine.



[ Reply to This | # ]
Make sure iTunes mounts a networked music library
Authored by: taxi on Apr 24, '07 06:50:42PM

I'd suggest you have an issue with either your SMB server or client setup. I do exactly the same thing, and it works great.

You may wish to consider turning off "Keep iTunes Music folder organised", as this for me caused some headaches - mainly because the library is shared, and one person modifying a song property broke the other people's ability to access the file. iTunes moves the file(s), and other users aren't automatically notified.

This type of setup allows for use with XBMC on my Xbox in the lounge, and using VLC on a laptop I borrow from work. I could possibly put iTunes on there, but importing an iTunes library doesn't work, and I don't want to import all of the files, that takes ages.



[ Reply to This | # ]
Make sure iTunes mounts a networked music library
Authored by: deviantintegral on Apr 23, '07 03:28:54PM

Anyone know of a way to make the drive mount if an iPod is plugged in, before iTunes launches?



[ Reply to This | # ]
Make sure iTunes mounts a networked music library
Authored by: JBCheong on Apr 23, '07 06:42:26PM
Firstly, thanks for this hint! Wish I thought of it myself.

manly, you'll want to check out this freeware, DSW ("Do Something When" by Azarhi Software).

http://www.azarhi.com/Projects/DSW/index.php

I used to use it to mount a network drive when iTunes launches (but of course, I'm using this hint's method from now on.) It'll work in your scenario too.

[ Reply to This | # ]
Make sure iTunes mounts a networked music library
Authored by: leebennett on Apr 23, '07 07:58:24PM

Dude! You so totally rock! And here all along I thought I was crazy for deciding to run my iTunes library on a networked volume...only to find this fabulous tip to prevent me from accidentally launching iTunes before mounting the volume!



[ Reply to This | # ]
Make sure iTunes mounts a networked music library
Authored by: ahoogerwerf on Apr 24, '07 07:19:43AM
As you already could see in this hint(read the comments!), another solution would be to move the library itself to the networked drive as well. This way iTunes will first mount the volume, to be able to load its library. Works since iTunes 7.

[ Reply to This | # ]
Make sure iTunes mounts a networked music library
Authored by: bill_mcgonigle on Apr 24, '07 01:39:40PM

I think this is what I'm doing - let me just elaborate for those reading along. Move your ~/Music/iTunes to the network shared folder, cmd-option drag it back to ~/Music. Make sure to store the password in the keychain so OSX can mount it for you.

Yeah, that's all, this is the kind of stuff that's worked well since System 7 came out with the Alias manager. Mine happens to be on a netatalk volume on my linux storage server, so I can easily RAID and rsnapshot it and hit it from MythTV.



[ Reply to This | # ]
Make sure iTunes mounts a networked music library
Authored by: taxi on Apr 24, '07 07:10:32PM

I think I tried this some time ago, and it didn't work reliably. Perhaps I should reinvestigate.



[ Reply to This | # ]
Note when updating iTunes
Authored by: taxi on Apr 24, '07 07:50:59PM

Note that if you update iTunes, you'll need to remove the icon it places in the dock, and re-add your alias.



[ Reply to This | # ]
Make sure iTunes mounts a networked music library
Authored by: timcrawf on Apr 26, '07 04:10:02AM

This hint is great, and actually a workaround.
iTunes used to do this by itself. That's right, back in versions 3 thru 5 I believe, iTunes used to mount the drive automagically. I have always had my files on a network share (the wife and I do listen to the same music :-)



[ Reply to This | # ]