Greasy Fork is available in English.

MusicBrainz Magic Tagger Button

Automatically enable the green tagger button on MusicBrainz.org depending on whether Picard is running.

Aŭtoro
Philipp Wolfer
Ĉiutagaj instaloj
0
Tutaj instaloj
88
Ratings
1 0 0
Versio
0.7.9
Kreita
2021/03/04
Ĝisdatigita
2023/12/01
Licenco
MIT
Aplikiĝas al

This script automatically enables the green tagger button Open in tagger on musicbrainz.org, which is used to send a release or recording to MusicBrainz Picard.

It will detect whether Picard is running and will enable the tagger buttons if they are disabled. It will even auto detect the proper port on which Picard is listening.

In addition this script will improve the tagger buttons themselves. Instead of just being static images they will change after being clicked, depending on whether the browser integration worked or not.

Important: To use this script in Chromium based browsers you must use MusicBrainz Picard 2.6.0b1 or later. In Firefox it works also with earlier versions of Picard, but using Picard 2.6 or later is still recommended.

Gotchas

Some things to be aware off:

  • You should use Picard 2.6.0b1 or later. This user script will not work with earlier versions of Picard when using Chromium based browsers (e.g. Google Chrome or Microsoft Edge). It currently will work on Firefox even with older Picard versions, but this could change in the future.
  • This has been tested on latest versions of Firefox, Google Chrome, Microsoft Edge, Opera and Vivaldi using Greasemonkey, Violentmonkey and Tampermonkey. It might or might not work on other browsers or with other user script managers. The code assumes your browser supports modern JS features (at least ES2017).
  • For Safari you need the Userscripts extension version 4 (which requires macOS 12.0+) and version 0.7 of MusicBrainz Magic Tagger Button. The user script does not work in Safari with older versions of the Userscripts extension due to strict blocking of unencrypted connections even if they are local.
  • I still consider this experimental and a proof of concept. It works for me, but might not for you.
  • It is recommended that you have configured Picard to use the default port 8000, but it has to be one port between 8000 - 8010.
  • If for some obscure reason you have Picard running on a port outside of this port range it won’t work, you’ll have to edit the script for this. Or just configure Picard to run on port 8000 again.
  • For detecting whether and on which port Picard is running this script performs HTTP GET requests on localhost against the above port range. If you have a local web server or anything else running on one of those ports better make sure it doesn’t do something unexpected. Proper software shouldn’t, but if you have setup a local webserver to delete all your files whenever you open https://localhost:8000 don’t come complain here.
  • Activating the tagger button requires an automatic page reload. The script tries to avoid page reloads unless necessary. Let me know if the reload happens in a situation where it causes issues.

License

MusicBrainz Magic Tagger Button - Copyright © 2021-2022 Philipp Wolfer ph.wolfer@gmail.com

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.