I’d like to search for tracks on iTunes using a Python script on Mac OS/X. I found a way to access the iTunes application through:
iTunes = SBApplication.applicationWithBundleIdentifier_("com.apple.iTunes")
but I haven’t figured out (yet) the way to perform searches. A little help appreciated.
Disclaimer: OS/X newbie here.
Note: I am not looking for ways to access the XML/plist database directly.
You might want to check out appscript (note, you’ll need ASDictionary for online help):
This might give you the most control by iterating over each item, but there’s a much faster way too, by using applescript hooks to do the searching:
Check out these appscript usage examples as well.