diff --git a/src/Structures/Playlist.ts b/src/Structures/Playlist.ts index 7ab093d..d76dd66 100644 --- a/src/Structures/Playlist.ts +++ b/src/Structures/Playlist.ts @@ -116,7 +116,7 @@ class Playlist { * @param {boolean} [withTracks=true] If it should build json with tracks * @returns {PlaylistJSON} */ - toJSON(withTracks = false) { + toJSON(withTracks = true) { const payload = { id: this.id, url: this.url, @@ -129,7 +129,7 @@ class Playlist { tracks: [] as TrackJSON[] }; - if (withTracks) payload.tracks = this.tracks.map((m) => m.toJSON(false)); + if (withTracks) payload.tracks = this.tracks.map((m) => m.toJSON(true)); return payload as PlaylistJSON; } diff --git a/src/Structures/Track.ts b/src/Structures/Track.ts index 456de2b..7504e55 100644 --- a/src/Structures/Track.ts +++ b/src/Structures/Track.ts @@ -174,7 +174,7 @@ class Track { durationMS: this.durationMS, views: this.views, requestedBy: this.requestedBy.id, - playlist: hidePlaylist ? null : this.playlist?.toJSON(false) ?? null + playlist: hidePlaylist ? null : this.playlist?.toJSON() ?? null } as TrackJSON; } }