-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Implement the basic AcousticBrainz Submit plugin #2342
Conversation
this failure here https://travis-ci.org/beetbox/beets/jobs/186448711 is the same I'm seeing in my PR. something has changed in either mutagen or the underlying build env. |
it seems to be mutagen. I filed #2343 |
Thanks for opening the new PR! This one seems to have cleared up the weird problems. Some answers to your questions from the other thread:
I think the appropriate thing to do is to use
Good idea! If you don't mind, let's add this in a subsequent PR—we can merge the first version and then add this "don't submit twice" feature. It should be pretty easy—we can use an |
A UserError is now raised if the plugin can be started. If an item fails to be analyzed or be submited an error is logged and the next item is tried.
I've updated this pull request, hopefully worked all the comments from the last pull request and added documentation. |
Wonderful; thank you! ✨ It looks like Travis is reminding us that the new file needs the standard header, complete with license text and the |
Or! There's some argument to be made here that we should just add this functionality to the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made a couple of small suggestions. It's definitely time to call this GCI task "completed," though, if you'd like to submit it!
) | ||
else: | ||
# Implicit path to extractor, search for it in path | ||
# TODO how to check for on Windows? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this comment still necessary? Any more questions about Windows?
Installation | ||
------------ | ||
|
||
The `absubmit` plugin requires the the `streaming_extractor_music`_ program to run. Its source can be found on `github`_, and while it is possible to compile the extractor from source, AcousticBrainz would prefer if you used thier binary (see the AcousticBrainz `FAQ`_). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Capitalize "GitHub"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the the => the
AcousticBrainz Submit Plugin | ||
============================ | ||
|
||
The `absubmit` plugin uses the `streaming_extractor_music`_ program to analyse an audio file and calculate different acoustic properties of the audio, the plugin then uploads this metadata to the AcousticBrainz server. The plugin does this when calling the ``beet absumbit [QUERY]`` command or on importing if the `auto` configuration options is set to ``yes``. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The first comma here should actually end the sentence (and begin a new one).
…acoustic properties of the audio. The plugin then uploads…
|
||
pip install requests | ||
|
||
After installing both the extractor binary and request you can enable the plgin ``absubmit`` in your configuration (see :ref:`using-plugins`). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
plgin -> plugin
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and request => and requests
Have added force option and check if acousticbrainz tag already set, similar to the acousticbrainz plugin pull request from myself |
There is some problem with removing the temp-json file in windows10.
Sorry the the german error text, it says the file cannot deleted because ifs used from a different process. Will check with https://docs.python.org/3/library/tempfile.html |
@@ -0,0 +1,31 @@ | |||
AcousticBrainz Submit Plugin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
options is => option is
Configuration | ||
------------- | ||
|
||
To configute the plugin, make a ``absubmit:`` section in your configuration file. The available options are: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
configute => configure
Thanks, @SusannaMaria—perhaps we're doing something wrong when closing the new temporary file? |
Have to check tomorrow, just finished some changes because of force-option on @inytar fork (made a pull request on his fork) inytar@b8fa8dc |
Sorry for the long wait, was away for a couple of days. I've fixed the above mentioned comments. |
No problem at all! There's no rush here. 😃 Sure—on further reflection, I can see the argument for keeping these as separate plugins. For the other one, the documentation doesn't even need to mention that you need to install the analysis program. It looks like Travis is still complaining about the coding line at the top of the file—and indeed, the new Python file needs the entire standard header comment. Other than that, I think this is ready to merge. |
Installation | ||
------------ | ||
|
||
The `absubmit` plugin requires the `streaming_extractor_music`_ program to run. Its source can be found on `GitHub`_, and while it is possible to compile the extractor from source, AcousticBrainz would prefer if you used thier binary (see the AcousticBrainz `FAQ`_). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thier -> their
Implement the basic AcousticBrainz Submit plugin
This is all merged up! ✨ Thank you for all your effort on this, @inytar. |
Maybe I'm wrong but the documentation says "To submit audio to AcousticBrainz, files must be tagged with MusicBrainz Identifiers. If they are not tagged, we recommend Picard.", maybe it's a good idea to write this sentence in |
@tux-00 Sure; it's a good point to mention that music needs MBIDs for submission. Would you mind adding that to the docs with a PR? It's just a matter of hitting the "edit" button on the appropriate page on GitHub. And we clearly shouldn't say "we recommend Picard" because beets of course does this perfectly well. Under ordinary circumstances, users' music will have already had MBIDs added by the import process. |
No problem but just to make sure that I understand :
I'm a little bit confused with the names of the beets MusicBrainz plugins. For example the plugin "MusicBrainz Submit Plugin" does not seem to submit anything. It's possible that I don't understand something, I'm new with MusicBrainz ! |
The importer (with no plugin at all) adds track MBIDs. And that And no worries at all! I'm happy to answer questions, even if they seem basic. |
When trying to run beets from sources, if the plugin doesn't find the the streaming_extractor_music binary beets raises this error :
So if I understand, if the importer cannot find the musicbrainz track id I cannot use the acousticbrainz to tag my tracks. |
Hmm; that actually looks like an unrelated bug—I don't know why EDIT: Oh, I see—those were two different questions. Right; the importer has to get an MBID for your music in order for AB submission to work. |
In fact, could you please open a separate bug with that traceback and full details about your setup? Looks like we need to investigate more closely. |
@sampsyo yes I will ! :) |
It's strange, I can't reproduce the distutils error.. Now I get a good error reporting : I remember that I have played with pip to install beets from sources, maybe something happened and reboot solve the problem. This is the only reason I've found ! |
Weird! Well, let us know if it comes back. |
This is a new upload for #2340 as that had some strange problems with the pull request and trying to fix it closed the pull request.
Copy of the last comment in that pull request: