databse ID is not constant

GO TO ADMIN PANEL > ADD-ONS AND INSTALL VERTIFORO SIDEBAR TO SEE FORUMS AND SIDEBAR

eustacescrubb

New member
Joined
Jan 18, 2002
Messages
2,284
Points
0
Age
45
Website
www.johnpauldavis.org
I discovered this while working on a script for someone else- they have an app that grabs the database ID along with other track data and makes an xml of it; my script grabs the xml and updates iTunes.

The interesting thing I noticed is that unless one updates iTunes immediately, one runs the risk of updating the wrong track because database ID is not constant - it is as long as iTunes remains open and no new tracks are added to the Library, but the moment tracks are added or iTunes is reopened, all bets are off.

I just found that interesting, and I'd never read anything about databse ID that suggested it before, so I thought I'd share so other Applescripters wouldn't run into this problem later.
 
Joined
Jul 1, 2003
Messages
705
Points
0
Location
Providence, RI, USA
Website
dougscripts.com
Yep, I was told In The Very Beginning to never rely on the permanence of the database id. It is internally managed by iTunes. Works fine during the same script session, but outside of that it's Unreliable. Same with track references (eg: "file track id 7248 of library playlist id 3641 of source id 35"). These are run-time only variables.
 
Top