From 6280bf5b81760aafaa56125e809ccd6d2e688f3a Mon Sep 17 00:00:00 2001 From: killer069 <65385476+killer069@users.noreply.github.com> Date: Thu, 9 Dec 2021 09:19:20 +0530 Subject: [PATCH] Playlist thumbnail issue fixed --- play-dl/YouTube/classes/Playlist.ts | 1 - play-dl/YouTube/classes/Thumbnail.ts | 3 --- play-dl/YouTube/classes/Video.ts | 1 - play-dl/YouTube/utils/extractor.ts | 7 +------ 4 files changed, 1 insertion(+), 11 deletions(-) diff --git a/play-dl/YouTube/classes/Playlist.ts b/play-dl/YouTube/classes/Playlist.ts index 1da8245..f6133c0 100644 --- a/play-dl/YouTube/classes/Playlist.ts +++ b/play-dl/YouTube/classes/Playlist.ts @@ -281,7 +281,6 @@ interface PlaylistJSON { * YouTube Playlist thumbnail Data */ thumbnail?: { - id: string | undefined; width: number | undefined; height: number | undefined; url: string | undefined; diff --git a/play-dl/YouTube/classes/Thumbnail.ts b/play-dl/YouTube/classes/Thumbnail.ts index b675eda..17cc550 100644 --- a/play-dl/YouTube/classes/Thumbnail.ts +++ b/play-dl/YouTube/classes/Thumbnail.ts @@ -1,11 +1,9 @@ export class YouTubeThumbnail { - id: string; url: string; width: number; height: number; constructor(data: any) { - this.id = data.id; this.url = data.url; this.width = data.width; this.height = data.height; @@ -13,7 +11,6 @@ export class YouTubeThumbnail { toJSON() { return { - id: this.id, url: this.url, width: this.width, height: this.height diff --git a/play-dl/YouTube/classes/Video.ts b/play-dl/YouTube/classes/Video.ts index 2ce19e7..571b909 100644 --- a/play-dl/YouTube/classes/Video.ts +++ b/play-dl/YouTube/classes/Video.ts @@ -38,7 +38,6 @@ interface VideoOptions { * YouTube Thumbnail Data */ thumbnail?: { - id: string | undefined; width: number | undefined; height: number | undefined; url: string | undefined; diff --git a/play-dl/YouTube/utils/extractor.ts b/play-dl/YouTube/utils/extractor.ts index 92018ec..ea36c19 100644 --- a/play-dl/YouTube/utils/extractor.ts +++ b/play-dl/YouTube/utils/extractor.ts @@ -435,12 +435,7 @@ export function getPlaylistVideos(data: any, limit = Infinity): YouTubeVideo[] { index: parseInt(info.index?.simpleText) || 0, duration: parseInt(info.lengthSeconds) || 0, duration_raw: info.lengthText?.simpleText ?? '0:00', - thumbnail: { - id: info.videoId, - url: info.thumbnail.thumbnails[info.thumbnail.thumbnails.length - 1].url, - height: info.thumbnail.thumbnails[info.thumbnail.thumbnails.length - 1].height, - width: info.thumbnail.thumbnails[info.thumbnail.thumbnails.length - 1].width - }, + thumbnails : info.thumbnail.thumbnails, title: info.title.runs[0].text, channel: { id: info.shortBylineText.runs[0].navigationEndpoint.browseEndpoint.browseId || undefined,