mirror of
https://github.com/Viren070/tmdb-addon.git
synced 2025-12-01 23:18:11 +01:00
+2
-6
@@ -156,9 +156,7 @@ addon.get("/:catalogChoices?/meta/:type/:id.json", async function (req, res) {
|
||||
|
||||
if (req.params.id.includes("tmdb:")) {
|
||||
const resp = await cacheWrapMeta(`${language}:${type}:${tmdbId}`, async () => {
|
||||
return await getMeta(type, language, tmdbId, rpdbkey, {
|
||||
hideEpisodeThumbnails: config.hideEpisodeThumbnails === "true"
|
||||
});
|
||||
return await getMeta(type, language, tmdbId, rpdbkey, config);
|
||||
});
|
||||
const cacheOpts = {
|
||||
staleRevalidate: 20 * 24 * 60 * 60,
|
||||
@@ -176,9 +174,7 @@ addon.get("/:catalogChoices?/meta/:type/:id.json", async function (req, res) {
|
||||
const tmdbId = await getTmdb(type, imdbId);
|
||||
if (tmdbId) {
|
||||
const resp = await cacheWrapMeta(`${language}:${type}:${tmdbId}`, async () => {
|
||||
return await getMeta(type, language, tmdbId, rpdbkey, {
|
||||
hideEpisodeThumbnails: config.hideEpisodeThumbnails === "true"
|
||||
});
|
||||
return await getMeta(type, language, tmdbId, rpdbkey, config);
|
||||
});
|
||||
const cacheOpts = {
|
||||
staleRevalidate: 20 * 24 * 60 * 60,
|
||||
|
||||
@@ -63,7 +63,7 @@ const buildMovieResponse = async (res, type, language, tmdbId, rpdbkey, config =
|
||||
]);
|
||||
|
||||
const imdbRating = imdbRatingRaw || res.vote_average?.toFixed(1) || "N/A";
|
||||
const castCount = config.castCount !== undefined ? Math.max(1, Math.min(5, Number(config.castCount))) : 5;
|
||||
const castCount = config.castCount
|
||||
const returnImdbId = config.returnImdbId === true || config.returnImdbId === "true";
|
||||
const hideInCinemaTag = config.hideInCinemaTag === true || config.hideInCinemaTag === "true";
|
||||
|
||||
@@ -130,7 +130,7 @@ const buildTvResponse = async (res, type, language, tmdbId, rpdbkey, config = {}
|
||||
]);
|
||||
|
||||
const imdbRating = imdbRatingRaw || res.vote_average?.toFixed(1) || "N/A";
|
||||
const castCount = config.castCount !== undefined ? Math.max(1, Math.min(5, Number(config.castCount))) : 5;
|
||||
const castCount = config.castCount
|
||||
const returnImdbId = config.returnImdbId === true || config.returnImdbId === "true";
|
||||
const hideInCinemaTag = config.hideInCinemaTag === true || config.hideInCinemaTag === "true";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user