In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] (Cutter Brown) wrote:
> One of the biggest issues I'm having right now is querying the Library
> by the database_id:
>
> my $track = $remote->obj(
> tracks => whose(database_id => equals => $args),
> playlist => 1
> );
>
> This actions seems to take forever (30+seconds). Is there a better way
> to get the track from id?
The problem is that iTunes is just very slow at whose searches.
There may be another way, though I don't know how reliable it is, and it's
more of a pain. Instead of getting the database ID, get the unique ID:
my $id = $sometrack->get->getdata;
Then:
my $track = $remote->obj(
track => obj_form(formUniqueID, typeLongInteger, $id),
playlist => 1
);
That's very fast, assuming a. you can get the unique IDs, and b. they are
reliably consistent for you. (This was somewhat documented in the Mac::Glue
POD, using iPhoto as an example, for a different problem.)
Good luck,
--
Chris Nandor [EMAIL PROTECTED] http://pudge.net/
Open Source Development Network [EMAIL PROTECTED] http://osdn.com/