iTunes TrackID and DatabaseID persistency

411 Views Asked by At

I'm using a COM object to read an iTunes library (version 11, Windows). I call the GetITObjectByID function to retrieve a bunch of tracks from a list saved in a text file in a previous iTunes session.

GetITObjectByID(SourceID, PlaylistID, TrackID, DatabaseID)

I would like to know at what extent these IDs are persistent? If they change over time, what kind of events can cause these changes? This will help me assess how reliable are the saved IDs and if I need tho refresh my ID database at each execution of my app.

Thanks.

1

There are 1 best solutions below

3
On

According to the iTunes COM documentation, all IDs are valid only for the session in which they are obtained: "An IITObject uniquely identifies a source, playlist, or track in iTunes using four separate IDs. These are runtime IDs, they are only valid while the current instance of iTunes is running."