0

On OS X, is there a way to ask iTunes for all the tracks it has, with some metadata (I'm most interested in the number of plays), and the filenames of the tracks (alternatively, simply a way to play them would be fine as well).

I know I could probably hack something up reading the iTunes database, but I'm looking for a solution that is not considered off-limits for acceptance into the Mac App Store.

Is this possible?

houbysoft
  • 32,532
  • 24
  • 103
  • 156
  • Possible duplicate http://stackoverflow.com/questions/664949/where-is-documentation-for-the-itunes-api-on-os-x – Fruity Geek Feb 07 '13 at 06:24
  • @FruityGeek: that only has a link to an old Windows COM API and unofficial libraries. I need an "official" way to get this info, so that I could potentially submit to the Mac App Store. – houbysoft Feb 07 '13 at 06:27
  • It also has reference to the apple script (which is what you are looking for). iTunes has an SDK on iOS because it's part of the operating system. It isn't part of the OS on OSX - it's just a program. – Fruity Geek Feb 07 '13 at 06:30
  • @FruityGeek: is using the Apple Script allowed in the Mac App Store? – houbysoft Feb 07 '13 at 06:33
  • http://dougscripts.com/itunes/category/mac-app-store/ Yup. – Fruity Geek Feb 07 '13 at 06:41

1 Answers1

1

iTunes is a program - not an intrinsic unremovable part of the operating system like it is on iOS - which is why there is not a dedicated SDK on OSX. You can access via iTunes via AppleScript.

There are applications on the Mac app store that are just GUI's on top of AppleScript. http://dougscripts.com/itunes/category/mac-app-store/

Fruity Geek
  • 7,351
  • 1
  • 32
  • 41