diff --git a/catalogs/lib/metadata.js b/catalogs/lib/metadata.js index 46d332a..4cfda9a 100644 --- a/catalogs/lib/metadata.js +++ b/catalogs/lib/metadata.js @@ -21,7 +21,8 @@ function _requestMetadata(ids, type) { const url = _getUrl(ids, type); return axios.get(url, { timeout: TIMEOUT }) .then(response => response?.data?.metas || response?.data?.metasDetailed || []) - .then(metas => metas.filter(meta => meta)); + .then(metas => metas.filter(meta => meta)) + .then(metas => metas.map(meta => _sanitizeMeta(meta))); } function _getUrl(ids, type) { @@ -32,4 +33,11 @@ function _getUrl(ids, type) { return `${CINEMETA_URL}/catalog/${type}/last-videos/lastVideosIds=${joinedIds}.json` } +function _sanitizeMeta(meta) { + delete meta.videos; + delete meta.credits_cast; + delete meta.credits_crew; + return meta; +} + module.exports = { getMetas };