fix(ExtractorModel): add source info

This commit is contained in:
DevAndromeda 2021-08-12 16:30:18 +05:45
parent 1fc810bce5
commit 53d711b643
No known key found for this signature in database
GPG key ID: FA40E3EC5CB6DCD6

View file

@ -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<ExtractorModelData, "playlist">["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"
})) ?? []
};
}