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


Click here to return to the 'Play iTunes from anywhere via SMB' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Play iTunes from anywhere via SMB
Authored by: mweier on Sep 23, '06 12:31:08AM
i had same problem as you (I was totally sick of iTunes changing my default library to ~/music/iTunes or whatever if the net volume wasn't connected. here's an applescript i cobbled to use instead of double-clicking itunes itself. it first checks whether my network volume is mounted -- if it is, it opens iTunes. if not, it makes sure it's reconnected, then launches itunes. i'm intrigued by the chmod route since my applescript doesn't solve the issue of the volume getting unmounted while itunes is already mounted... if you wantr to use, just customize the volume name and/or procol (cifs vs smb) throughout, as well as in the if statement. in my case, i'm using workgroup as the workgroup, mamecade as the server name, music as the shared folder and mweier as the user i connect with (pw comes from keychain, presumably) any AS guru's who want to streamline, go for it!

 


tell application "Finder"
activate
if exists disk "MUSIC" then
tell application "iTunes"
activate
end tell
return
end if
try
mount volume "cifs://workgroup;mweier@mamecade/music"
on error
beep
display dialog ¬
"Couldn't find music" buttons "Cancel" default button 1 with icon caution
end try
repeat until (list disks) contains "MUSIC"
end repeat
tell application "iTunes"
activate
end tell
return
end tell


[ Reply to This | # ]