Address review comments.

This commit is contained in:
Alok Saboo 2023-05-11 20:12:32 -04:00
parent 16e6a2d490
commit e4c669adcd
2 changed files with 11 additions and 2 deletions

View file

@ -977,11 +977,20 @@ class Spotify(RemoteArtSource):
class CoverArtUrl(RemoteArtSource): class CoverArtUrl(RemoteArtSource):
# This source is intended to be used with the plugin that sets the
# cover_art_url field on albums or tracks. Users can also manually update
# the cover_art_url field using the "set" command. This source will then
# use that URL to fetch the image.
NAME = "Cover Art URL" NAME = "Cover Art URL"
def get(self, album, plugin, paths): def get(self, album, plugin, paths):
image_url = None image_url = None
try: try:
# look for cover_art_url on album or first track
if album.cover_art_url:
image_url = album.cover_art_url
else:
image_url = album.items().get().cover_art_url image_url = album.items().get().cover_art_url
self._log.debug(f'Cover art URL {image_url} found for {album}') self._log.debug(f'Cover art URL {image_url} found for {album}')
except (AttributeError, TypeError): except (AttributeError, TypeError):

View file

@ -269,7 +269,7 @@ Spotify backend is enabled by default and will update album art if a valid Spoti
Cover Art URL Cover Art URL
''''''''''''' '''''''''''''
The `fetchart` plugin can also use a flexible attribute field ``cover_art_url`` where you can manually specify the image URL to be used as cover art. Any custom plugin can use this field to provide the cover art and ``fetchart`` will use it as a source. Just add ``cover_art_url`` to the list of sources in your configuration to enable this source. The `fetchart` plugin can also use a flexible attribute field ``cover_art_url`` where you can manually specify the image URL to be used as cover art. Any custom plugin can use this field to provide the cover art and ``fetchart`` will use it as a source.
Storing the Artwork's Source Storing the Artwork's Source
---------------------------- ----------------------------