mirror of
https://github.com/beetbox/beets.git
synced 2025-12-06 16:42:42 +01:00
fetchart: fix exception when source returns None
This commit is contained in:
parent
5b50f235c6
commit
0c49db0f11
5 changed files with 15 additions and 5 deletions
|
|
@ -12,7 +12,7 @@
|
|||
# The above copyright notice and this permission notice shall be
|
||||
# included in all copies or substantial portions of the Software.
|
||||
|
||||
__version__ = '1.0rc1'
|
||||
__version__ = '1.0rc2-dev'
|
||||
__author__ = 'Adrian Sampson <adrian@radbox.org>'
|
||||
|
||||
import beets.library
|
||||
|
|
|
|||
|
|
@ -149,13 +149,17 @@ def _source_urls(album):
|
|||
necessary.
|
||||
"""
|
||||
if album.mb_albumid:
|
||||
yield caa_art(album.mb_albumid)
|
||||
url = caa_art(album.mb_albumid)
|
||||
if url:
|
||||
yield url
|
||||
|
||||
# Amazon and AlbumArt.org.
|
||||
if album.asin:
|
||||
for url in art_for_asin(album.asin):
|
||||
yield url
|
||||
yield aao_art(album.asin)
|
||||
url = aao_art(album.asin)
|
||||
if url:
|
||||
yield url
|
||||
|
||||
def art_for_album(album, path, maxwidth=None, local_only=False):
|
||||
"""Given an Album object, returns a path to downloaded art for the
|
||||
|
|
|
|||
|
|
@ -1,6 +1,12 @@
|
|||
Changelog
|
||||
=========
|
||||
|
||||
1.0rc2 (in development)
|
||||
-----------------------
|
||||
|
||||
* :doc:`/plugins/fetchart`: Fix a regression that caused crashes when art was
|
||||
not available from some sources.
|
||||
|
||||
1.0rc1 (December 17, 2012)
|
||||
--------------------------
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ project = u'beets'
|
|||
copyright = u'2012, Adrian Sampson'
|
||||
|
||||
version = '1.0'
|
||||
release = '1.0rc1'
|
||||
release = '1.0rc2-dev'
|
||||
|
||||
pygments_style = 'sphinx'
|
||||
|
||||
|
|
|
|||
2
setup.py
2
setup.py
|
|
@ -42,7 +42,7 @@ if 'sdist' in sys.argv:
|
|||
shutil.copytree(os.path.join(docdir, '_build', 'man'), mandir)
|
||||
|
||||
setup(name='beets',
|
||||
version='1.0rc1',
|
||||
version='1.0rc2-dev',
|
||||
description='music tagger and library organizer',
|
||||
author='Adrian Sampson',
|
||||
author_email='adrian@radbox.org',
|
||||
|
|
|
|||
Loading…
Reference in a new issue