dougscripts.com

July 27 2007 - 6:56 am

Capacity and Free Space Bug?

I haven't thoroughly investigated this, but I thought I'd put it out there. Using AppleScript you should be able to get the capacity and free space of a mounted iPod. These are two properties of source, along with kind. Thus, the result of this snippet should be a list of numbers representing the free space of each mounted iPod:

tell application "iTunes"
	get free space of every source whose kind is iPod
end tell

I get 0.0 each time. This is wrong, as my Video iPod has well over 12GB of free space. Likewise, I get 0.0 if I attempt to get thecapacity.

This occurs with iTunes 7.3.1 with the iPod I mentioned above. Because the rest of my family is currently away with their iPods, I was only able to test a second generation Mini with iTunes 7.1.1 and the snippet works; it does not work with iTunes 7.3.1. So I can only assume that it's not the iPod but iTunes. Regrettably, I do not know which version of iTunes this bug first appeared.

This affects a small number of AppleScripts, notably "Rip To iPod" which uses capacity and free space to determine if there is enough room on the iPod to copy ripped CD tracks. Because of this bug, it always reports that there is not enough room. I'll update "Rip To iPod" to work around this.

Site contents © 2001 - 2024 (that's right: 2001) Doug Adams and weblished by Doug Adams. Contact support AT dougscripts DOT com. About.
All rights reserved. Privacy.
AppleScript, iTunes, iPod, iPad, and iPhone are registered trademarks of Apple Inc. This site has no direct affiliation with Apple, Inc.
The one who says "it cannot be done" should not be interrupting the one who is doing it.