From 771b15e09f41e8c6b5153a005005db1ddd1a1601 Mon Sep 17 00:00:00 2001 From: absidue <48293849+absidue@users.noreply.github.com> Date: Sun, 27 Feb 2022 11:28:45 +0100 Subject: [PATCH] Add permalink property to SoundCloudTrack --- play-dl/SoundCloud/classes.ts | 6 ++++++ play-dl/SoundCloud/constants.ts | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/play-dl/SoundCloud/classes.ts b/play-dl/SoundCloud/classes.ts index 0fcff6e..ae1254f 100644 --- a/play-dl/SoundCloud/classes.ts +++ b/play-dl/SoundCloud/classes.ts @@ -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, diff --git a/play-dl/SoundCloud/constants.ts b/play-dl/SoundCloud/constants.ts index 04f1c35..08656aa 100644 --- a/play-dl/SoundCloud/constants.ts +++ b/play-dl/SoundCloud/constants.ts @@ -13,6 +13,10 @@ export interface SoundTrackJSON { * SoundCloud Track url */ url: string; + /** + * User friendly SoundCloud track URL + */ + permalink: string; /** * SoundCloud Track fetched status */