SongInfo
The raw information of a song.
It is the input of the Song constructor: a plugin builds it from the data of its source.
Type Parameters
Section titled “Type Parameters”T = unknown
Properties
Section titled “Properties”ageRestricted?
Section titled “ageRestricted?”ageRestricted?: boolean;Whether the song is age-restricted.
dislikes?
Section titled “dislikes?”dislikes?: number;The number of dislikes of the song.
duration?
Section titled “duration?”duration?: number;The duration of the song, in seconds.
id: string;The identifier of the song in its source.
isLive?
Section titled “isLive?”isLive?: boolean;Whether the song is a live stream.
likes?
Section titled “likes?”likes?: number;The number of likes of the song.
metadata?
Section titled “metadata?”metadata?: T;Source specific metadata of the song.
It is used by the plugin that created the song to keep the data it needs to
play it (stream url, identifiers, …). It is ignored when the song is
created with a metadata option.
name?: string;The name of the song.
playFromSource
Section titled “playFromSource”playFromSource: boolean;Whether the song can be streamed directly from its source.
When it is false, DisTube looks for a playable version of the song with
the other plugins.
plugin
Section titled “plugin”plugin: | DisTubePlugin | null;The plugin that created this song, or null when it was created manually.
reposts?
Section titled “reposts?”reposts?: number;The number of reposts (shares) of the song.
source
Section titled “source”source: string;The identifier of the source of the song, e.g. my-source.
thumbnail?
Section titled “thumbnail?”thumbnail?: string;The URL of the thumbnail of the song.
uploader?
Section titled “uploader?”uploader?: object;The uploader (the author, the channel, …) of the song.
name?: string;The name of the uploader.
url?: string;The URL of the uploader.
url?: string;The URL of the song.
views?
Section titled “views?”views?: number;The number of views of the song.