Comment 3 for bug 394095

Revision history for this message
PaulWay (paulway) wrote : Re: Renaming music directory causes loss of metadata

I see two ways of doing this:

1) Have a hash for each of the filename, the path (without the filename), and the id3 tag data. If a file shows up as new, check whether there are matches on any of those three hashes. If two of them match and the third one doesn't, then it's probably been renamed, retagged, or moved outside Rhythmbox.

If one of the hashes matches but the other two don't, then it might be reasonable to check with the user whether they this is the same track as before. If a whole bunch of files have changed two hashes but kept a third, then it might be more reasonable to assume that e.g. a directory has been retagged or renamed.

2) Use something like musicbrainz, which can recognise a track by a musical 'fingerprint' of the audio. This allows tracks to be recognised even if the tags have been moved in the file, the file renamed, the path changed, and even the file re-encoded. I don't know how unique and reliable the fingerprint is, however.