Add permalink property to SoundCloudTrack

This commit is contained in:
absidue 2022-02-27 11:28:45 +01:00
parent d1d0b7256a
commit 771b15e09f
2 changed files with 10 additions and 0 deletions

View File

@ -104,6 +104,10 @@ export class SoundCloudTrack {
* SoundCloud Track url
*/
url: string;
/**
* User friendly SoundCloud track URL
*/
permalink: string;
/**
* SoundCloud Track fetched status
*/
@ -150,6 +154,7 @@ export class SoundCloudTrack {
this.name = data.title;
this.id = data.id;
this.url = data.uri;
this.permalink = data.permalink_url;
this.fetched = true;
this.type = 'track';
this.durationInSec = Math.round(Number(data.duration) / 1000);
@ -187,6 +192,7 @@ export class SoundCloudTrack {
name: this.name,
id: this.id,
url: this.url,
permalink: this.permalink,
fetched: this.fetched,
durationInMs: this.durationInMs,
durationInSec: this.durationInSec,

View File

@ -13,6 +13,10 @@ export interface SoundTrackJSON {
* SoundCloud Track url
*/
url: string;
/**
* User friendly SoundCloud track URL
*/
permalink: string;
/**
* SoundCloud Track fetched status
*/