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

Use AppleScript to disable Gracenote in iTunes Apps
This is a short and obvious hint, but it took me a fair amount of research to come up with it, so I thought I'd share it here.

The fact that iTunes 5.0 unconditionally contacts Gracenote is not just annoying, it can also break the functionality of any script that involves CDs. If, for example, Gracenote returns multiple hits, iTunes puts up a possibly-obscured dialog box waiting for a reply, causing the invoking script to hang.

The solution is to use ipfw to block outgoing calls to service.gracenote.com. Here is my AppleScript which does just that:

set d to display dialog 
  "Disable or Enable Gracenote?" buttons ["Disable", "Enable", "Cancel"] 
  default button 3
set r to (button returned of d)

if r is "Disable" then
  do shell script 
  "ipfw add 099 deny ip from any to service.gracenote.com" 
  with administrator privileges
end if
if r is "Enable" then
  do shell script "ipfw delete 099" with administrator privileges
end if
Caveats:
  1. If you have configured the OS X firewall in System Preferences, this will interfere with those settings.
  2. I'm not an ipfw expert; this works for me, but it may be necessary to enable ipfw first or something.
[robg adds: I haven't tested this one...]
    •    
  • Currently 2.50 / 5
  You rated: 3 / 5 (4 votes cast)
 
[13,362 views]  

Use AppleScript to disable Gracenote in iTunes | 4 comments | Create New Account
Click here to return to the 'Use AppleScript to disable Gracenote in iTunes' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Use AppleScript to disable Gracenote in iTunes
Authored by: airdrummer on Oct 26, '05 08:25:36AM

isn't there a preference in itunes, something like "connect to the internet automatically"? i'm not near my mac right now so i can't check...



[ Reply to This | # ]
Use AppleScript to disable Gracenote in iTunes
Authored by: DougAdams on Oct 26, '05 08:38:48AM

That Preference setting was removed in iTunes 5.0.

---
Doug's AppleScripts for iTunes
http://www.dougscripts.com/itunes/



[ Reply to This | # ]
Use AppleScript to disable Gracenote in iTunes
Authored by: airdrummer on Oct 27, '05 08:08:55AM

yoiks! shows ya how often i use itoonz;-}



[ Reply to This | # ]
Use AppleScript to disable Gracenote in iTunes
Authored by: disgracenote on Oct 09, '06 04:15:32PM
I tried the version on Doug Adam's site:

http://www.dougscripts.com/itunes/scripts/ss.php?sp=disablegracenote

but it isn't working for me in OSX10.2.8 iTunes 6.05.

It doesn't block the gracenote.com request, and gives errors when enabled or disabled from the iTunes scripts menu:

"ipfw rule 99: setsockopt(IP_FW_DEL): invalid argument"

[ Reply to This | # ]