Re: Determine media type in iTunes
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