fetchart: Move iTunes priority

I like the CAA as a first-priority search because the images are generally
high-quality and there's no metadata ambiguity (we always find the right
release if it's in the catalog).
This commit is contained in:
Adrian Sampson 2014-11-06 10:37:58 -08:00
parent b9752fe40a
commit fc6664455a
2 changed files with 21 additions and 16 deletions

View file

@ -31,9 +31,9 @@ from beets import config
try:
import itunes
itunes_available = True
HAVE_ITUNES = True
except ImportError:
itunes_available = False
HAVE_ITUNES = False
IMAGE_EXTENSIONS = ['png', 'jpg', 'jpeg']
CONTENT_TYPES = ('image/jpeg',)
@ -227,16 +227,16 @@ def _source_urls(album):
through this sequence early to avoid the cost of scraping when not
necessary.
"""
# iTunes Store.
if itunes_available:
yield itunes_art(album)
# Cover Art Archive.
if album.mb_albumid:
yield caa_art(album.mb_albumid)
if album.mb_releasegroupid:
yield caa_group_art(album.mb_releasegroupid)
# iTunes Store.
if HAVE_ITUNES:
yield itunes_art(album)
# Amazon and AlbumArt.org.
if album.asin:
for url in art_for_asin(album.asin):

View file

@ -91,16 +91,8 @@ Album Art Sources
-----------------
Currently, this plugin searches for art in the local filesystem as well as on
the iTunes Store, the Cover Art Archive, Amazon, and AlbumArt.org (in that
order).
To use the iTunes Store as an art source, you must install the `python-itunes`_
library. You can do this using `pip`_, like so::
$ pip install python-itunes
.. _python-itunes: https://github.com/ocelma/python-itunes
.. _pip: http://pip.openplans.org/
the Cover Art Archive, the iTunes Store (optionally), Amazon, AlbumArt.org,
and Google Image Search (optionally), in that order.
When looking for local album art, beets checks for image files located in the
same folder as the music files you're importing. Beets prefers to use an image
@ -112,6 +104,19 @@ When you choose to apply changes during an import, beets will search for art as
described above. For "as-is" imports (and non-autotagged imports using the
``-A`` flag), beets only looks for art on the local filesystem.
iTunes Store
''''''''''''
To use the iTunes Store as an art source, install the `python-itunes`_
library. You can do this using `pip`_, like so::
$ pip install python-itunes
Once the library is installed, the plugin will use it to search automatically.
.. _python-itunes: https://github.com/ocelma/python-itunes
.. _pip: http://pip.openplans.org/
Google Image Search
'''''''''''''''''''