fetchart plugin retrieves album art images from various sources on the
Web and stores them as image files.
pip install requests
The plugin uses requests to fetch album art from the Web.
Fetching Album Art During Import¶
When the plugin is enabled, it automatically gets album art for every album you import.
By default, beets stores album art image files alongside the music files for an
album in a file called
cover.jpg. To customize the name of this file, use
the art_filename config option.
To configure the plugin, make a
fetchart: section in your configuration
file. The available options are:
- auto: Enable automatic album art fetching during import.
- cautious: Pick only trusted album art by ignoring filenames that do not
contain one of the keywords in
- cover_names: Prioritize images containing words in this list.
cover front art album folder.
- minwidth: Only images with a width bigger or equal to
minwidthare considered as valid album art candidates. Default: 0.
- maxwidth: A maximum image width to downscale fetched images if they are
too big. The resize operation reduces image width to at most
maxwidthpixels. The height is recomputed so that the aspect ratio is preserved.
- enforce_ratio: Only images with a width:height ratio of 1:1 are
considered as valid album art candidates. Default:
- remote_priority: Query remote sources every time and use local image only
no; remote (Web) art sources are only queried if no local art is found in the filesystem.
- sources: List of sources to search for images. An asterisk * expands
to all available sources.
coverart itunes amazon albumart, i.e., everything but
- google_key: Your Google API key (to enable the Google Custom Search backend). Default: None.
- google_engine: The custom search engine to use. Default: The beets custom search engine, which searches the entire web.
Here’s an example that makes plugin select only images that contain front or back keywords in their filenames and prioritizes the iTunes source over others:
fetchart: cautious: true cover_names: front back sources: itunes *
Manually Fetching Album Art¶
fetchart command to download album art after albums have already
$ beet fetchart [-f] [query]
By default, the command will only look for album art when the album doesn’t
already have it; the
--force switch makes it search for art
in Web databases regardless. If you specify a query, only matching albums will
be processed; otherwise, the command processes every album in your library.
Beets can resize images using Pillow, ImageMagick, or a server-side resizing proxy. If either Pillow or ImageMagick is installed, beets will use those; otherwise, it falls back to the resizing proxy. If the resizing proxy is used, no resizing is performed for album art found on the filesystem—only downloaded art is resized. Server-side resizing can also be slower than local resizing, so consider installing one of the two backends for better performance.
When using ImageMagick, beets looks for the
convert executable in your path.
On some versions of Windows, the program can be shadowed by a system-provided
convert.exe. On these systems, you may need to modify your
environment variable so that ImageMagick comes first or use Pillow instead.
Album Art Sources¶
By default, this plugin searches for art in the local filesystem as well as on
the Cover Art Archive, the iTunes Store, Amazon, and AlbumArt.org, in that
You can reorder the sources or remove
some to speed up the process using the
sources configuration option.
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 file whose name contains “cover”, “front”, “art”, “album” or “folder”, but in the absence of well-known names, it will use any image file in the same folder as your music files.
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.
$ pip install https://github.com/ocelma/python-itunes/archive/master.zip
(There’s currently a problem that prevents a plain
python-itunes from working.)
Once the library is installed, the plugin will use it to search automatically.
Google custom search¶
To use the google image search backend you need to
register for a Google API key. Set the
option to your key, then add
Optionally, you can define a custom search engine. Get your search engine’s
token and use it for your
google_engine configuration option. The
default engine searches the entire web for cover art.
Note that the Google custom search API is limited to 100 queries per day. After that, the fetchart plugin will fall back on other declared data sources.