• 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: KOENIG Yvan <email@hidden>
  • Date: Thu, 14 Jul 2011 12:05:01 +0200

Le 14 juil. 2011 à 11:12, Philipp Leusmann a écrit :

>
> Hi,
>
> when scripting iTunes I would like to process audio files only.
> I figured a decent way to decide whether a file is audio or not, is to use the "kind" attribute of the track object. But when using this, I always get a localized String like "MPEG-Audiodatei" (in German).
> Is there any way to compare this response to a localized reference string?
>
> Or is there a simpler way to decide the type of a track?

The property Type Identifier may be useful.

set my_file to "path:to:your:file"

tell application "System Events" to set type_ID to type identifier of disk item my_file

Yvan KOENIG (VALLAURIS, France) jeudi 14 juillet 2011 12:04:18



 _______________________________________________
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

References: 
 >Determine media type in iTunes (From: Philipp Leusmann <email@hidden>)

  • Prev by Date: Determine media type in iTunes
  • Next by Date: move a file to an external drive
  • Previous by thread: Determine media type in iTunes
  • Next by thread: Re: Determine media type in iTunes
  • Index(es):
    • Date
    • Thread