diff --git a/beetsplug/fetchart.py b/beetsplug/fetchart.py index 6b9fa375e..408b947ca 100644 --- a/beetsplug/fetchart.py +++ b/beetsplug/fetchart.py @@ -164,9 +164,14 @@ def _logged_get(log, *args, **kwargs): message = 'getting URL' req = requests.Request('GET', *args, **req_kwargs) + with requests.Session() as s: s.headers = {'User-Agent': 'beets'} prepped = s.prepare_request(req) + settings = s.merge_environment_settings( + prepped.url, {}, None, None, None + ) + send_kwargs.update(settings) log.debug('{}: {}', message, prepped.url) return s.send(prepped, **send_kwargs) diff --git a/docs/changelog.rst b/docs/changelog.rst index fe3a8e8af..4c91b422c 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -110,6 +110,9 @@ New features: Fixes: +* :doc:`/plugins/fetchart`: Fixed a bug that caused fetchart to not take + environment variables such as proxy servers into account when making requests + :bug:`3450` * :doc:`/plugins/inline`: In function-style field definitions that refer to flexible attributes, values could stick around from one function invocation to the next. This meant that, when displaying a list of objects, later