jesseward / discogstagger

Console based audio-file metadata tagger that uses the Discogs.com API v2 (JSON based). Relies on the Mutagen and discogs-client libraries. Currently supports FLAC and MP3 file types.
MIT License
70 stars 13 forks source link

Add check if Discogs release matches local release #5

Open timpulver opened 11 years ago

timpulver commented 11 years ago

Would be great to have the possibility to perform a check if the Discogs release and the local release do match. For example if one track is missing on the local release, all tracks will be written wrong without a check.

triplem commented 11 years ago

A check for the right number of tracks is already implemented. Are there more checks, which should be implemented?

jesseward commented 11 years ago

right now the check is very limited.

if the number of tracks matches the number returned by the discogs api, then we assume all is well. Right now tracks are sorted then matched alphabetically. In addition to a simple count, we should add basic string comparison to ensure there at-least X amount of similarity between source track name and the returned discogs track name.

python's difflib or a wrapper around difflib such as https://github.com/seatgeek/fuzzywuzzy would do the trick.

timpulver commented 11 years ago

Beets compares some values and returns the similarities in percent. I think this solution is quite nice. You could add a threshold parameter, like »everything beyond 70% similarity is okay«. Here is the relevant beets source.