Metadata
Metadata is a map of string values. Spotify chooses the keys, and every value is a string, including numbers and booleans.
type Metadata = Partial<Record<string, string>>;Track metadata often includes these keys:
title,artist_name,artist_uri,album_title,album_uriandalbum_artist_namename the track and where it comes from.duration,album_track_number,album_disc_numberandpopularityhold numbers as strings.image_url,image_small_url,image_large_urlandimage_xlarge_urlpoint to the artwork in different sizes.collection.in_collection,collection.can_addandhas_lyricshold"true"or"false".- Keys that start with
canvas.describe the track’s Canvas video, when it has one.
const liked = Spicetify.Player.data?.item.metadata['collection.in_collection'] === 'true';