mirror of
https://github.com/beetbox/beets.git
synced 2025-12-06 16:42:42 +01:00
reuse the 'sources' names from the configuration for art_source
This commit is contained in:
parent
7a9c3e592b
commit
5fbca32ea4
2 changed files with 9 additions and 12 deletions
|
|
@ -197,7 +197,7 @@ class ArtSource(RequestMixin):
|
|||
raise NotImplementedError()
|
||||
|
||||
def _candidate(self, **kwargs):
|
||||
return Candidate(source=self.NAME, log=self._log, **kwargs)
|
||||
return Candidate(source=self, log=self._log, **kwargs)
|
||||
|
||||
def fetch_image(self, candidate, extra):
|
||||
raise NotImplementedError()
|
||||
|
|
@ -764,7 +764,7 @@ class FetchArtPlugin(plugins.BeetsPlugin, RequestMixin):
|
|||
self._log.debug(
|
||||
u"Storing art_source for {0.albumartist} - {0.album}",
|
||||
album)
|
||||
album.art_source = candidate.source
|
||||
album.art_source = SOURCE_NAMES[type(candidate.source)]
|
||||
album.store()
|
||||
|
||||
# Synchronous; after music files are put in place.
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ file. The available options are:
|
|||
Default: The `beets custom search engine`_, which searches the entire web.
|
||||
**fanarttv_key**: The personal API key for requesting art from
|
||||
fanart.tv. See below.
|
||||
- **store_source**: If enabled, fetchart store the artwork's source in a
|
||||
- **store_source**: If enabled, fetchart stores the artwork's source in a
|
||||
flexible tag named ``art_source``. See below for the rationale behind this.
|
||||
Default: ``no``.
|
||||
|
||||
|
|
@ -188,18 +188,15 @@ personal key will give you earlier access to new art.
|
|||
Storing the Artwork's Source
|
||||
----------------------------
|
||||
|
||||
Storing the current artwork's source gives the opportunity to selectively
|
||||
search for new art. For example, if some albums have artwork placed manually in
|
||||
their directories that should not be replaced by a forced album art fetch, you
|
||||
could do
|
||||
Storing the current artwork's source might be used to narrow down
|
||||
``fetchart`` commands. For example, if some albums have artwork placed
|
||||
manually in their directories that should not be replaced by a forced
|
||||
album art fetch, you could do
|
||||
|
||||
``beet fetchart -f ^art_source:filesystem``
|
||||
|
||||
The values written to ``art_source`` are:
|
||||
|
||||
``'Cover Art Archive'``, ``'Amazon'``, ``'AlbumArt.org scraper'``, ``'Google Images'``,
|
||||
``'fanart.tv'``, ``'iTunes Store'``, ``'Wikipedia (queried through DBpedia)'``,
|
||||
``'Filesystem'``
|
||||
The values written to ``art_source`` are the same names used in the ``sources``
|
||||
configuration value.
|
||||
|
||||
Embedding Album Art
|
||||
-------------------
|
||||
|
|
|
|||
Loading…
Reference in a new issue