[Pythonmac-SIG] appscript: selecting many songs in iTunes
hengist.podd at virgin.net
Tue Jan 17 14:43:21 CET 2006
Niko Matsakis wrote:
>>Depends what you're trying to get. iTunes scripting interface is pretty extensive, but a lot of the implementation is rather crude and many commands won't work on more than one object at a time.
>Okay, so this error is probably iTunes' fault?
>>appscript.specifier.CommandError: Application Error -10014: Handler only handles single objects.
>> Failed command: app(u'/Applications/iTunes.app').sources['Library'].playlists['Library'].tracks.filter(its.database_ID.isin([7253, 7255, 7257, 7259, 7261, 7263, 7265, 7267, 7269, 7271, 7273, 7275, 7277])).get()
>As you can see, I am just trying to fetch a list of references in this case, not delete them in one step. Here is my python code:
> handlers = _get_tracks().filter (its.database_ID.isin (idlist)).get ()
>Is there something wrong with what I am doing?
The code's well-formed, but iTunes isn't smart enough to handle your request. Its implementation is second-rate, as I say.
>If this *is* just a limitation in iTunes, I have to admit I'm a bit of a loss as to how to proceed.
Did you try the alternative script I suggested? How did that fare?
More information about the Pythonmac-SIG