Thursday, April 30, 2009

Forcing iTunes to automatically check for purchases

Yes, I am aware that there is an option in iTunes to automatically check for purchases (such as TV show subscriptions). And I have it checked. But for some mysterious reason, iTunes simply refuses to automatically check for downloads on my old PowerPC Mac Mini (still running Tiger) which I use as my media hub. It has been a minor annoyance to me for some time now, and I haven't been able to find a solution 'til now. This doesn't really fix the problem exactly - but it's a nifty little hack that achieves the result I'm looking for. Through the magic of AppleScript and cron, my problem is solved!

I found the magic URL for forcing iTunes to check for purchases, and created the following AppleScript to invoke it:

tell application "iTunes"
open location "itmss://phobos.apple.com/WebObjects/MZFinance.woa /wa/checkForPurchases?ign-mscache=1"
end tell


Then, edit crontab to run the script every 4 hours:
0 0,4,8,12,16,20 * * * osascript ~/Documents/check_itunes.scpt

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home