• WANTED: Happy members who like to discuss audio and other topics related to our interest. Desire to learn and share knowledge of science required. There are many reviews of audio hardware and expert members to help answer your questions. Click here to have your audio equipment measured for free!

Fixed my iTunes library “date added” to work better with Roon library imports

nugget

Member
Forum Donor
Joined
Jan 21, 2019
Messages
53
Likes
93
Location
Houston Texas USA
I’ve got an iTunes library that dates back for well over a decade. As part of my migration from using iTunes as my primary music player to using Roon, I added my iTunes media folder as a library for my Roon Core server. This works great, except I’ve noticed that the “date added” for the tracks in my library were very unreliable.

First the date added showed up as this week for every track, but I quickly figured out that I could fix that changing the Roon “Library > Import Settings > Track Import Dates” to use File Creation Time instead of Roon Import Timestamp.

But that still left a bit of a mess. macOS filesystems don’t actually track creation time, just file modification time. As you can imagine, there are countless ways that file modification times can get unintentionally updated over the years, as you move your library around from drive to drive or move to a new computer, or move to a NAS. I found that my file times were very untethered from the true date I added each track to my iTunes library.

So… I wrote a tool that will parse the iTunes Library.XML file and correct any file timestamps that disagreed with the iTunes database’s added date for that track. I just ran it on my library and then forced a reload in Roon and now all my added dates are accurate to reality. Huge improvement for data geeks like me.

Source code and binaries are published at https://github.com/nugget/itunes-file-mtimes if anyone else thinks they might find this useful.
 
Top Bottom