Comment 10 for bug 905669

Revision history for this message
Albert Santoni (gamegod) wrote : Re: [Bug 905669] Re: Take file mtime's into account when calculating freshness hashes during scanning.

Hi guys,

Like Ben Clark said, modified files in directories don't get their metadata
reloaded upon rescan. This is by design. The reason the hashing only looks
at filenames is to detect three cases:
1) New files added to a directory
2) Files deleted from a directory (or moved)
3) Files renamed in a directory

Again, we specifically did not want to detect modifications to files in
those directories because then you have to deal with metadata conflicts.
For example, if the user adds BPM to a song in the Mixxx sqlite db, and
then they add a different BPM externally to the ID3, we can't assume which
one the user actually wants as the BPM in Mixxx. Mixxx now has a "reload
metadata from disk" option (I think?) which is a reasonable way to solve
this for now.

Thanks,
Albert

On Tue, Mar 20, 2012 at 7:36 AM, Ben Clark <email address hidden>wrote:

> The process is roughly:
>
> scan directories recursively:
> for each filename in directory:
> newHashStr += filename
> if hash(newHashStr) != hash_in_database(dir):
> for each filename in directory:
> if exists_in_db(filename):
> mark as verified
> else:
> add file to tracksToAdd list
>
> add tracksToAdd list to the database
>
>
> simply adding the mtime to the directory hash doesn't cause the files to
> be updated, since if the file exists in the database at all, it's
> considered to be the same and isn't updated. So the patch I created in
> #4 won't do anything in this case. This will likely require a bit of
> refactoring to change. Given that the tracks shouldn't actually update,
> I'm not sure what is causing the slowdown.
>
> --
> You received this bug notification because you are a member of Mixxx
> Development Team, which is subscribed to Mixxx.
> https://bugs.launchpad.net/bugs/905669
>
> Title:
> Take file mtime's into account when calculating freshness hashes
> during scanning.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/mixxx/+bug/905669/+subscriptions
>

--
Albert Santoni
Developer, Mixxx
http://www.mixxx.org
http://www.oscillicious.com