mirror of
https://github.com/beetbox/beets.git
synced 2026-01-03 22:42:44 +01:00
Changelog, tweaks for fetchart sources (#1075)
This commit is contained in:
parent
288fb0da4c
commit
d3f0742276
3 changed files with 26 additions and 23 deletions
|
|
@ -285,20 +285,6 @@ def art_for_album(album, paths, maxwidth=None, local_only=False):
|
|||
return out
|
||||
|
||||
|
||||
def sanitize_sources(sources):
|
||||
"""Remove unknown or duplicate sources while keeping original order.
|
||||
"""
|
||||
seen = set()
|
||||
others_sources = set(SOURCES_ALL) - set(sources)
|
||||
res = []
|
||||
for s in sources:
|
||||
if s in SOURCES_ALL + ['*']:
|
||||
if not (s in seen or seen.add(s)):
|
||||
res.extend(list(others_sources) if s == '*' else [s])
|
||||
if not HAVE_ITUNES and 'itunes' in res:
|
||||
res.remove('itunes')
|
||||
return res
|
||||
|
||||
# PLUGIN LOGIC ###############################################################
|
||||
|
||||
|
||||
|
|
@ -327,6 +313,22 @@ def batch_fetch_art(lib, albums, force, maxwidth=None):
|
|||
message))
|
||||
|
||||
|
||||
def sanitize_sources(sources):
|
||||
"""Clean up the user's configured source list. Remove unknown or
|
||||
duplicate sources while keeping original order.
|
||||
"""
|
||||
seen = set()
|
||||
others = set(SOURCES_ALL) - set(sources)
|
||||
res = []
|
||||
for s in sources:
|
||||
if s in SOURCES_ALL + ['*']:
|
||||
if not (s in seen or seen.add(s)):
|
||||
res.extend(list(others) if s == '*' else [s])
|
||||
if not HAVE_ITUNES and 'itunes' in res:
|
||||
res.remove('itunes')
|
||||
return res
|
||||
|
||||
|
||||
class FetchArtPlugin(BeetsPlugin):
|
||||
def __init__(self):
|
||||
super(FetchArtPlugin, self).__init__()
|
||||
|
|
|
|||
|
|
@ -29,8 +29,9 @@ Features:
|
|||
disable this, unset the ``auto`` config flag.
|
||||
* Standard cover art in APEv2 metadata is now supported. Thanks to Matthias
|
||||
Kiefer. :bug:`1042`
|
||||
* :doc:`/plugins/fetchart`: Art can now be searched for on the iTunes Store,
|
||||
using the python-itunes library.
|
||||
* :doc:`/plugins/fetchart`: Art can now be searched for on the iTunes Store.
|
||||
There's also a new ``sources`` config option that lets you choose exactly
|
||||
where to look for images and in which order.
|
||||
* :doc:`/plugins/replaygain`: A new Python Audio Tools backend was added.
|
||||
Thanks to Francesco Rubino. :bug:`1070`
|
||||
|
||||
|
|
|
|||
|
|
@ -45,13 +45,13 @@ file. The available options are:
|
|||
as fallback.
|
||||
Default: ``no``; remote (Web) art sources are only queried if no local art is
|
||||
found in the filesystem.
|
||||
- **sources**: List of websites sources to query when searching arts. Star char
|
||||
`*` expands to all available sources.
|
||||
Default : ``coverart itunes albumart amazon google`` ie all sources
|
||||
- **sources**: List of sources to search for images. An asterisk `*` expands
|
||||
to all available sources.
|
||||
Default: ``coverart itunes albumart amazon google``, i.e., all sources
|
||||
|
||||
Here's an example that makes plugin select only images that contain *front* or
|
||||
*back* keywords in their filenames and prioritize 'itunes' over others
|
||||
sources::
|
||||
*back* keywords in their filenames and prioritizes the iTunes source over
|
||||
others::
|
||||
|
||||
fetchart:
|
||||
cautious: true
|
||||
|
|
@ -97,8 +97,8 @@ 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, AlbumArt.org,
|
||||
and Google Image Search, in that order. You can remove sources to speed up the
|
||||
process, or reorder them using the ``sources`` configuration option.
|
||||
and Google Image Search, in that order. 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
|
||||
|
|
|
|||
Loading…
Reference in a new issue