You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
iTunes track_id does not remain persistent. Any changes to your iTunes library, such and changing any metadata may very well cause the track_id to change. I had this happen to me. Only the persistent_id field remains unchanged no matter what you do to the library. This can result in errant behavior if one is relying on the track_id to never change for a particular track.
Is there a specific reason the persistent_id is not being used to build the dictionaries/lists?
The text was updated successfully, but these errors were encountered:
After further investigating this issue, it appears whenever iTunes detects any changes that have been made to a 'Track' (i.e. Year, track number, album name, composer) metadata the entire iTunes Library.xml file is written back to disk and that previous 'track_id' is different for that track. Only the 'persistent_id' is consistent across any changes or deletions. Therefore, for anyone using this library who needs to be able to consistently refer to the same track, regardless of any updates made within the iTunes application, you will need to use the 'peristent_id' field.
I will see what I can do to make the 'Tracks' dictionary use the 'persistent_id' field as the key rather than the 'track_id' field. I discovered this after printing out hundreds of pages with track names and then find out the names no longer match up to a track_id after making a few changes within the iTunes library. Expensive mistake!
I created a new variable right below 'self.songs' named 'self.byPID' and then at the end of the getSongs() function I added just below 'self.songs[int(trackid)] = s', 'self.byPID[s.persistent_id] = s' this will now create an additional dictionary 'byPID' that can be used to manage tracks by their 'persistent_id' rather than 'track_id', which can change at anytime.
iTunes track_id does not remain persistent. Any changes to your iTunes library, such and changing any metadata may very well cause the track_id to change. I had this happen to me. Only the persistent_id field remains unchanged no matter what you do to the library. This can result in errant behavior if one is relying on the track_id to never change for a particular track.
Is there a specific reason the persistent_id is not being used to build the dictionaries/lists?
The text was updated successfully, but these errors were encountered: