• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Determine media type in iTunes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Determine media type in iTunes


  • Subject: Re: Determine media type in iTunes
  • From: Doug Adams <email@hidden>
  • Date: Fri, 15 Jul 2011 13:29:08 -0400

On JThu, 14 Jul 2011 11:12:56 +0200, Philipp Leusmann wrote:

> when scripting iTunes I would like to process audio files only.

This can be tricky but there are a couple of options. You could check a track's
video kind property and if it errors it *might* be an audio file. If you are getting
a track from library playlist 1, get its persistent ID and see if there is a track with
that persistent ID in the "Music" library (some playlist whose special kind is Music).

I've even gone as far as using mdls on a track's file to see if the word "audio" shows up
in the kMDItemContentTypeTree or kMDItemContentType.

You may also want to look at using afinfo in a do shell script.

That's all I got.
--
dougscripts.com






 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Prev by Date: Re: Indesign data merge
  • Next by Date: apple mail trigger an as
  • Previous by thread: Re: Determine media type in iTunes
  • Next by thread: move a file to an external drive
  • Index(es):
    • Date
    • Thread