fix
This commit is contained in:
@@ -230,8 +230,21 @@ async function getAnimeInfoExtension(ext, id) {
|
||||
try {
|
||||
const match = await ext.getMetadata(id);
|
||||
if (match) {
|
||||
await (0, queries_1.cacheExtension)(extName, id, match.title, match);
|
||||
return match;
|
||||
const normalized = {
|
||||
title: match.title ?? "Unknown",
|
||||
summary: match.summary ?? "No summary available",
|
||||
episodes: Number(match.episodes) || 0,
|
||||
characters: Array.isArray(match.characters) ? match.characters : [],
|
||||
season: match.season ?? null,
|
||||
status: match.status ?? "Unknown",
|
||||
studio: match.studio ?? "Unknown",
|
||||
score: Number(match.score) || 0,
|
||||
year: match.year ?? null,
|
||||
genres: Array.isArray(match.genres) ? match.genres : [],
|
||||
image: match.image ?? ""
|
||||
};
|
||||
await (0, queries_1.cacheExtension)(extName, id, normalized.title, normalized);
|
||||
return normalized;
|
||||
}
|
||||
}
|
||||
catch (e) {
|
||||
|
||||
Reference in New Issue
Block a user