Add permalink property to SoundCloudTrack
This commit is contained in:
parent
d1d0b7256a
commit
771b15e09f
@ -104,6 +104,10 @@ export class SoundCloudTrack {
|
|||||||
* SoundCloud Track url
|
* SoundCloud Track url
|
||||||
*/
|
*/
|
||||||
url: string;
|
url: string;
|
||||||
|
/**
|
||||||
|
* User friendly SoundCloud track URL
|
||||||
|
*/
|
||||||
|
permalink: string;
|
||||||
/**
|
/**
|
||||||
* SoundCloud Track fetched status
|
* SoundCloud Track fetched status
|
||||||
*/
|
*/
|
||||||
@ -150,6 +154,7 @@ export class SoundCloudTrack {
|
|||||||
this.name = data.title;
|
this.name = data.title;
|
||||||
this.id = data.id;
|
this.id = data.id;
|
||||||
this.url = data.uri;
|
this.url = data.uri;
|
||||||
|
this.permalink = data.permalink_url;
|
||||||
this.fetched = true;
|
this.fetched = true;
|
||||||
this.type = 'track';
|
this.type = 'track';
|
||||||
this.durationInSec = Math.round(Number(data.duration) / 1000);
|
this.durationInSec = Math.round(Number(data.duration) / 1000);
|
||||||
@ -187,6 +192,7 @@ export class SoundCloudTrack {
|
|||||||
name: this.name,
|
name: this.name,
|
||||||
id: this.id,
|
id: this.id,
|
||||||
url: this.url,
|
url: this.url,
|
||||||
|
permalink: this.permalink,
|
||||||
fetched: this.fetched,
|
fetched: this.fetched,
|
||||||
durationInMs: this.durationInMs,
|
durationInMs: this.durationInMs,
|
||||||
durationInSec: this.durationInSec,
|
durationInSec: this.durationInSec,
|
||||||
|
|||||||
@ -13,6 +13,10 @@ export interface SoundTrackJSON {
|
|||||||
* SoundCloud Track url
|
* SoundCloud Track url
|
||||||
*/
|
*/
|
||||||
url: string;
|
url: string;
|
||||||
|
/**
|
||||||
|
* User friendly SoundCloud track URL
|
||||||
|
*/
|
||||||
|
permalink: string;
|
||||||
/**
|
/**
|
||||||
* SoundCloud Track fetched status
|
* SoundCloud Track fetched status
|
||||||
*/
|
*/
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user