Add permalink property to SoundCloudTrack
This commit is contained in:
parent
d1d0b7256a
commit
771b15e09f
@ -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,
|
||||
|
||||
@ -13,6 +13,10 @@ export interface SoundTrackJSON {
|
||||
* SoundCloud Track url
|
||||
*/
|
||||
url: string;
|
||||
/**
|
||||
* User friendly SoundCloud track URL
|
||||
*/
|
||||
permalink: string;
|
||||
/**
|
||||
* SoundCloud Track fetched status
|
||||
*/
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user