Added playability parameter to SpotifyTrack

This commit is contained in:
Atari Tom 2022-03-31 11:18:25 -04:00
parent ea5bdc266b
commit 73644f6c9d

View File

@ -93,6 +93,10 @@ export class SpotifyTrack {
* Spotify Track explicit info.
*/
explicit: boolean;
/**
* Spotify Track playability info.
*/
playable: boolean;
/**
* Spotify Track Duration in seconds
*/
@ -123,6 +127,7 @@ export class SpotifyTrack {
this.type = 'track';
this.url = data.external_urls.spotify;
this.explicit = data.explicit;
this.playable = data.is_playable;
this.durationInMs = data.duration_ms;
this.durationInSec = Math.round(this.durationInMs / 1000);
const artists: SpotifyArtists[] = [];