This commit is contained in:
2025-12-15 16:21:06 +01:00
parent 5d8441bf27
commit f1f95953dd
19 changed files with 429 additions and 144 deletions

View File

@@ -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) {