From a51f2826f65dec94319b8c90c7269e9987e3c7e6 Mon Sep 17 00:00:00 2001 From: killer069 <65385476+killer069@users.noreply.github.com> Date: Sat, 18 Sep 2021 17:53:28 +0530 Subject: [PATCH] Fixed toJSON issues --- play-dl/YouTube/classes/Video.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/play-dl/YouTube/classes/Video.ts b/play-dl/YouTube/classes/Video.ts index 02bcb47..eaf0dc0 100644 --- a/play-dl/YouTube/classes/Video.ts +++ b/play-dl/YouTube/classes/Video.ts @@ -41,7 +41,12 @@ export class Video { durationInSec: number; uploadedAt?: string; views: number; - thumbnail?: Thumbnail; + thumbnail?: { + id: string | undefined; + width: number | undefined; + height: number | undefined; + url: string | undefined; + }; channel?: Channel; videos?: Video[]; likes: number; @@ -87,7 +92,7 @@ export class Video { durationInSec: this.durationInSec, durationRaw: this.durationRaw, uploadedAt: this.uploadedAt, - thumbnail: this.thumbnail?.toJSON(), + thumbnail: this.thumbnail, channel: { name: this.channel?.name as string, id: this.channel?.id as string,