diff --git a/beets/autotag/mb.py b/beets/autotag/mb.py index 53fe80a3a..0334cff1e 100644 --- a/beets/autotag/mb.py +++ b/beets/autotag/mb.py @@ -97,8 +97,11 @@ def configure(): from the beets configuration. This should be called at startup. """ hostname = config['musicbrainz']['host'].as_str() - use_https = config['musicbrainz']['use_https'].get(bool) - musicbrainzngs.set_hostname(hostname, use_https) + https = config['musicbrainz']['https'].get(bool) + # Only call set_hostname when a custom server is configured. Since + # musicbrainz-ngs connects to musicbrainz.org with HTTPS by default + if hostname != "musicbrainz.org": + musicbrainzngs.set_hostname(hostname, https) musicbrainzngs.set_rate_limit( config['musicbrainz']['ratelimit_interval'].as_number(), config['musicbrainz']['ratelimit'].get(int), diff --git a/beets/config_default.yaml b/beets/config_default.yaml index 06445a687..74540891e 100644 --- a/beets/config_default.yaml +++ b/beets/config_default.yaml @@ -102,7 +102,7 @@ statefile: state.pickle musicbrainz: host: musicbrainz.org - use_https: yes + https: no ratelimit: 1 ratelimit_interval: 1.0 searchlimit: 5 diff --git a/docs/changelog.rst b/docs/changelog.rst index bc7eb367e..4e3d1b374 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -47,7 +47,7 @@ Major new features: Other new things: * Enable HTTPS support to Musicbrainz by default and add configuration option - `use_https`. + `https` for custom servers. * :doc:`/plugins/mpdstats`: Add a new `strip_path` option to help build the right local path from MPD information. * :doc:`/plugins/convert`: Conversion can now parallelize conversion jobs on diff --git a/docs/reference/config.rst b/docs/reference/config.rst index 8c4b9c373..92570e882 100644 --- a/docs/reference/config.rst +++ b/docs/reference/config.rst @@ -691,17 +691,18 @@ MusicBrainz Options ------------------- You can instruct beets to use `your own MusicBrainz database`_ instead of -the `main server`_. Use the ``host``, ``use_https`` and ``ratelimit`` options +the `main server`_. Use the ``host``, ``https`` and ``ratelimit`` options under a ``musicbrainz:`` header, like so:: musicbrainz: host: localhost:5000 - use_https: no + https: no ratelimit: 100 The ``host`` key, of course, controls the Web server hostname (and port, optionally) that will be contacted by beets (default: musicbrainz.org). -The ``use_https`` key makes the client use https instead of http (default: yes). +The ``https`` key makes the client use https instead of http, this setting applies +only to custom servers. The official musicbrainz server always uses HTTPS (default: no). The server must have search indices enabled (see `Building search indexes`_). The ``ratelimit`` option, an integer, controls the number of Web service requests