mirror of
https://github.com/beetbox/beets.git
synced 2025-12-06 16:42:42 +01:00
changelog and style fixes for #665
This commit is contained in:
parent
1d212eb126
commit
dd053d7723
2 changed files with 9 additions and 5 deletions
|
|
@ -47,13 +47,14 @@ def _fetch_image(url):
|
|||
log.debug(u'fetchart: downloading art: {0}'.format(url))
|
||||
try:
|
||||
with closing(requests_session.get(url, stream=True)) as resp:
|
||||
if not 'Content-Type' in resp.headers \
|
||||
or not resp.headers['Content-Type'] in CONTENT_TYPES:
|
||||
if 'Content-Type' not in resp.headers \
|
||||
or resp.headers['Content-Type'] not in CONTENT_TYPES:
|
||||
log.debug(u'fetchart: not an image')
|
||||
return
|
||||
|
||||
# Generate a temporary file with the correct extension.
|
||||
with NamedTemporaryFile(suffix=DOWNLOAD_EXTENSION, delete=False) as fh:
|
||||
with NamedTemporaryFile(suffix=DOWNLOAD_EXTENSION, delete=False) \
|
||||
as fh:
|
||||
for chunk in resp.iter_content():
|
||||
fh.write(chunk)
|
||||
log.debug(u'fetchart: downloaded art to: {0}'.format(
|
||||
|
|
|
|||
|
|
@ -4,8 +4,6 @@ Changelog
|
|||
1.3.5 (in development)
|
||||
----------------------
|
||||
|
||||
Changelog goes here!
|
||||
|
||||
New stuff:
|
||||
|
||||
* :doc:`/plugins/replaygain`: Added support for calcuating ReplayGain values with
|
||||
|
|
@ -13,6 +11,11 @@ New stuff:
|
|||
calculation for practially all formats. The upgraded plugin is backward
|
||||
compatible configuration-wise.
|
||||
|
||||
Fixes:
|
||||
|
||||
* :doc:`/plugins/fetchart`: Fix a crash when the server does not specify a
|
||||
content type. Thanks to Lee Reinhardt.
|
||||
|
||||
|
||||
1.3.4 (April 5, 2014)
|
||||
---------------------
|
||||
|
|
|
|||
Loading…
Reference in a new issue