0

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.

JnLlnd
  • 165
  • 1
  • 14

1 Answers1

1

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."

dwpj65
  • 76
  • 3
  • Can you share the link to the doc that contains that quote? – TheDude Feb 13 '14 at 08:59
  • That's true. I have not seen it in the doc. RTFM... I know... In the mean time, I've found how to retrieve a track using the persistent IDs that remain valid. Please see [http://stackoverflow.com/questions/21058852/retrieve-an-itunes-track-object-from-its-high-low-persistent-id?rq=1](this question), especially the last answer. – JnLlnd Feb 14 '14 at 03:44
  • I have not seen the document linked in some time, although it's a CHM (Compiled Hypertext File) called ITunesCOM.CHM. Unfortunately it appears Apple requires you register for a developer ID for this content at this point, if it is still available. – dwpj65 Feb 14 '14 at 04:45