From b9cd8649c1d711b18a0f707eb99b76754cdf7481 Mon Sep 17 00:00:00 2001 From: Androz2091 Date: Sat, 11 Jul 2020 11:09:40 +0200 Subject: [PATCH] :sparkles: Add fromPlaylist property to track class --- src/Player.js | 3 ++- src/Track.js | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Player.js b/src/Player.js index 52db046..0308ba4 100644 --- a/src/Player.js +++ b/src/Player.js @@ -177,7 +177,8 @@ class Player { duration: i.duration, thumbnail: i.thumbnail, author: i.author, - link: i.url + link: i.url, + fromPlaylist: true }, null, null))) } } diff --git a/src/Track.js b/src/Track.js index 91cf172..24ac3f3 100644 --- a/src/Track.js +++ b/src/Track.js @@ -51,6 +51,11 @@ class Track { * @type {Discord.User?} */ this.requestedBy = user + /** + * Whether the track was added from a playlist + * @type {boolean} + */ + this.fromPlaylist = videoData.fromPlaylist ?? false /** * The queue in which the track is * @type {Queue}