@addasoft/art-downloader
v1.14.1
Published
download artist and album art based on the MBID
Downloads
38
Readme
Art-downloader
Download artist art based on their MBID. This node.js program reads a JSON-based music file as used by JSMusicDB, whose structure is based on scanner.py. For each found artist both fanart and Deezer are queried to find art for the artist. If a lot of artists need to be queried a rate limit can occur. If that is the case the program will sleep for 1 minute and then try again. Please be patient while we do our best to find all the art.
Config
The following variables should be set in .env
:
LASTFMAPIKEY
: your last.fm API key. Used to fetch metadata about the found artist. Mainly used for rapid MBID lookup.FANARTAPIKEY
: your fanart API key. Used for looking up missing art at fanart.OUTPUT_FOLDER
: optional the output folder for cache and status files.ART_FOLDER
: optional the output folder for the art images; defaults toOUTPUT_FOLDER/art/
.MUSIC_FILE
: optional full path to your JSMusicDB compatible music file; defaults to./src
.SOURCE_BASE
: optional the base folder to which the paths inMUSIC_FILE
resolve. Used when trying to write art to the source folders.
Options
--skipArtists
will skip all processing for artists.--skipAlbums
will skip all processing for albums.--turbo
only download art for newly fetched MBIDs.--printArtistsWithoutArt
will print a list of all artists and their MBID for which no art is found.--printArtists
will print a list of all artists and their MBID.--printAlbums
will print a list of all albums and the URL to the source of the art--printAlbumsWithoutArt
will print a list of all albums that have no source for their MBID--updateLib
will extend the sourceMUSIC_FILE
with the MBIDs--writeSource
will writecover.[jpg|png|webp|...]
files in the folder per album found inSOURCE_BASE
--daemon
output minimal progress to output folder in the fileprogress.txt
Tip: you can export the output of
--printArtists
and--printAlbums
to a file. For example:npm run start --printAlbums > albums.txt
Output
Art is downloaded to ART_FOLDER
or ./output/art/
if ART_FOLDER
is not specified in .env
.
The output logs are stored in ./output
and will contain 2 parts:
artists.json
a map of all cached artist <> MBID pairs found. This is used to speed up the process the next time you run the application.albums.json
a map of all cached albums <>{MBID, URL}
pairs found. Since last.fm has the album art and does the MBID lookup the data is stored in one go.artists-without-art.json
a map of all artists <> MBID for which no art could be found, neither cached nor online. You can use the MBID to save your art for example.