From 7753f3573706d93476a182fed20da37842d69a2a Mon Sep 17 00:00:00 2001 From: Snowflake107 Date: Thu, 13 May 2021 11:23:18 +0545 Subject: [PATCH] getter: Track#source --- src/Structures/Track.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Structures/Track.ts b/src/Structures/Track.ts index b2759f1..c92c057 100644 --- a/src/Structures/Track.ts +++ b/src/Structures/Track.ts @@ -133,6 +133,14 @@ export class Track { .map((m, i) => parseInt(m) * times(60, i)) .reduce((a, c) => a + c, 0); } + + /** + * Returns source of this track + * @type {TrackSource} + */ + get source() { + return this.raw.source ?? 'arbitrary'; + } /** * String representation of this track