Re-imported file matching

After realizing that I had about 7 corrupted flacs in the library, I re-ripped these files and re-imported them into roon. Roon sees them as new even though I created the IMPORTDATE tag with the original import date, recreated the musicbrainz metadata, re-identified the album and did not run the “clean up library” function (in fact it suggests deleting 7 files).

This led me to ask myself what parameters Roon uses to understand if a file that is re-imported is new or if it matches it to an already existing db entry.

Do you have any ideas?

It’s possible because the checksum of the data in the old files does not of course match the checksum of the data in the new files. IOW, Roon is correctly asserting that you never actually imported the truly correct files to begin with. Why the IMPORTDATE tag isn’t overriding that, I have no actual idea, though. Have you checked each newly imported track’s metadata preference to make sure your setting has been honored?

Yes, I checked and everything seemed ok

And what happens if you follow Roon’s recommendation to clean up your library by deleting the 7 files from its database?

But if I do the clean-up I will surely lose the history that Roon had for those files.
My goal would be to replace those flacs with the new ripped versions, but at the same time keep the Roon information like playcount, playback history, etc…