beetbox / pyacoustid

Python bindings for Chromaprint acoustic fingerprinting and the Acoustid Web service
MIT License
325 stars 66 forks source link

Fingerprint submission #9

Closed alastair closed 12 years ago

alastair commented 12 years ago

Initial cut of fingerprint submission

sampsyo commented 12 years ago

Thanks for working this out, Alastair! Looks great. I just changed a couple of names and reordered the API key parameters to submit() for consistency with the other functions.

I'm also thinking of making an "easy" wrapper to this function that does the fingerprinting and submission for a single file.

alastair commented 12 years ago

Yup, I have plans for a file version too. I was making a decision on what library to use for reading tags - do you have any ideas?

sampsyo commented 12 years ago

I was uncertain about that. I was reluctant to introduce a dependency on a particular library, because users of pyacoustid are likely to have already settled on their own tag-reading library (Mutagen and TagLib come to mind). So it's a weird position to be in.

Anyway, looking at the source, the acoustid server seems really to only want the mbid parameter. The remaining parameters are only present so the server can look up the MBID itself if you don't have it. So a "light" version of the file API could just accept the MBID to be sent as a parameter rather than trying to do any tag reading itself. Not a perfect solution, of course.