Expand description
Fanart.tv music artwork: artist portraits, logos, banners and backgrounds, album covers and disc art, plus record-label logos.
Deliberately no network, like crate::acoustid and
crate::musicbrainz: this module builds the address to ask and reads
the answer somebody else fetched.
§Second for a portrait, only, for a logo
crate::wikipedia::portrait_file is asked before this for a portrait —
a Commons image is reached through the identifier MusicBrainz already
gave, and Commons hosts nothing whose licence is not stated. Fanart.tv is
user-submitted: fetch --portraits uses it only where Wikidata has
nothing, and the record it leaves says which service actually answered, so
a reader who cares about that distinction can tell — see SOURCE.
A logo has no such alternative to try first: Wikidata states no logo claim
for an artist, so fetch --logos asks Fanart.tv directly, under its own
record name — see LOGO_SOURCE. A banner rides the very same request:
fetch --logos --banners reads banner_url out of the answer already
fetched for the logo, rather than asking twice for one artist.
§Indexed by the identifier that never needed a search
Unlike AcoustID, which is shown a fingerprint and has to guess which
recording it is, Fanart.tv is asked about an artist by MusicBrainz
identifier — the same one every artist record in sources.json already
carries. There is nothing to score and nothing to arbitrate: the answer is
either this artist’s images or none.
Structs§
- Album
Artwork - Fanart.tv artwork belonging to one MusicBrainz release group.
Constants§
- ALBUM_
COVER_ SOURCE - The completion record for Fanart.tv album covers.
- ARTWORK_
SOURCE - The legacy record left after the complete Fanart.tv artwork pass inspected an artist or album before artwork families became independently selectable. Kept so those completed passes are not needlessly repeated.
- BACKGROUND_
SOURCE - The completion record for Fanart.tv artist backgrounds.
- BANNER_
SOURCE - The completion record for Fanart.tv artist banners.
- CDART_
SOURCE - The completion record for Fanart.tv disc artwork.
- KEY_
VARIABLE - The environment variable holding the application key.
- LABEL_
LOGO_ SOURCE - The separate source record for a record label’s logo.
- LOGO_
SOURCE - The name a logo is stored under — not
SOURCE, though the same request answers both. - PORTRAIT_
ARTWORK_ SOURCE - The completion record for Fanart.tv artist portraits.
- REQUEST_
INTERVAL - How long to wait between requests.
- SOURCE
- The name records from this service carry in
sources.json. - WEB_
SERVICE - Base address of the service.
Functions§
- album_
artwork - Reads the album artwork embedded in an artist response from API v3.2.
- artist_
response - Refuses a response whose identity does not match the artist requested.
- background_
url - The best artist background, preferring the native 4K pool.
- banner_
url - The artist’s banner address to download, or
Nonewhen the service has none. - key
- The key this machine holds, when it holds one.
- label_
logo_ url - The record label’s logo address, or
Nonewhen it has none. - label_
lookup_ url - Where to ask about one record label, by its MusicBrainz label identifier.
- label_
response - Refuses a response whose identity does not match the label requested.
- logo_
url - The artist’s logo address to download, or
Nonewhen the service has none. - lookup_
url - Where to ask about one artist.
- no_key
- What to tell somebody who has no application key.
- portrait_
url - The image address to download, or
Nonewhen the service has nothing.