Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inserting twice the same music #100

Open
fazelmk opened this issue Aug 5, 2016 · 1 comment
Open

Inserting twice the same music #100

fazelmk opened this issue Aug 5, 2016 · 1 comment

Comments

@fazelmk
Copy link

fazelmk commented Aug 5, 2016

there is a issue in the validation of duplicated songs, its in the in the init.py on dejavu folder start around line 56.

Change

    filenames_to_fingerprint = []
    for filename, _ in decoder.find_files(path, extensions):

        # don't refingerprint already fingerprinted files
        if decoder.unique_hash(filename) in self.songhashes_set:
            print "%s already fingerprinted, continuing..." % filename
            continue

        filenames_to_fingerprint.append(filename)

by

   filenames_to_fingerprint = []
    for filename, _ in decoder.find_files(path, extensions):

        # don't refingerprint already fingerprinted files
        songHash = decoder.unique_hash(filename)
        if songHash in self.songhashes_set:
            print "%s already fingerprinted, continuing..." % filename
            continue

        filenames_to_fingerprint.append(filename)
        self.songhashes_set.add(songHash)

this way it adds the new song hash to the self.songhashes_set and find duplicated songs in the folder.

@thesunlover
Copy link
Contributor

seems good suggestion, but nobody can merge it ... :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants