On Tue, Nov 28, 2006 at 11:09:41AM -0800, Craig Amundsen wrote:
> I've moved a bunch of my files around and rather than do the 1 at a time
> showing iTunes the new location, I'd like to use appscript to set the
> location of the moved songs to the new value.

Just FYI if you don't know already, iTunes uses aliases to keep track
of file locations, so if you're not moving across volumes, you
shouldn't have to do anything at all.

> Based on my reading it looks like
> track.location.set('/Path/To/The/File')
> should do what I want.

You may end up needing to use HFS rather than POSIX paths, or even
aliases, depending on what iTunes expects.

> The trouble I'm having is getting iTunes to give me a list of all the tracks
> in the library. I've tried various versions of things in the wiki and hints
> I've found via Google, but none have worked for me. Is there a canonical
> appscript call into iTunes that will return a list of all tracks in the
> library?

iTunes.sources.filter(its.kind==k.library)[1].library_playlists[1].tracks()

if you're using a newer appscript, you'd want instead:

iTunes.sources.[its.kind==k.library][1].library_playlists[1].tracks()

-- 
Nicholas Riley <[EMAIL PROTECTED]> | <http://www.uiuc.edu/ph/www/njriley>
_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig

Reply via email to