From 53d711b643d55edb10e781942a02ffc3dabd4acd Mon Sep 17 00:00:00 2001 From: DevAndromeda <46562212+DevAndromeda@users.noreply.github.com> Date: Thu, 12 Aug 2021 16:30:18 +0545 Subject: [PATCH] fix(ExtractorModel): add source info --- src/Structures/ExtractorModel.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Structures/ExtractorModel.ts b/src/Structures/ExtractorModel.ts index f85d438..dc81618 100644 --- a/src/Structures/ExtractorModel.ts +++ b/src/Structures/ExtractorModel.ts @@ -38,16 +38,16 @@ class ExtractorModel { return { playlist: data.playlist ?? null, data: - // eslint-disable-next-line @typescript-eslint/no-explicit-any - data.info?.map((m: any) => ({ - title: m.title, - duration: m.duration, - thumbnail: m.thumbnail, + (data.info as Omit["data"])?.map((m) => ({ + title: m.title as string, + duration: m.duration as number, + thumbnail: m.thumbnail as string, engine: m.engine, - views: m.views, - author: m.author, - description: m.description, - url: m.url + views: m.views as number, + author: m.author as string, + description: m.description as string, + url: m.url as string, + source: m.source || "arbitrary" })) ?? [] }; }