feat: cast images

This commit is contained in:
stekc
2025-05-07 15:06:09 -07:00
committed by mrcanelas
parent 25fb763ce7
commit 4e1be2cf3a
4 changed files with 30 additions and 11 deletions
+2 -2
View File
@@ -176,8 +176,8 @@ async function getManifest(config) {
favicon: `${process.env.HOST_NAME}/favicon.png`,
logo: `${process.env.HOST_NAME}/logo.png`,
background: `${process.env.HOST_NAME}/background.png`,
name: "The Movie Database Addon",
description: "Stremio addon that provides rich metadata for movies and TV shows from TMDB, featuring customizable catalogs, multi-language support, favorites lists, watchlist, ratings, and IMDb integration. Current settings: " + activeConfigs,
name: "The Movie Database",
description: "Fork of the TMDB addon for use with Omni (https://omni.stkc.win). Current settings: " + activeConfigs,
resources: ["catalog", "meta"],
types: ["movie", "series"],
idPrefixes: provideImdbId ? ["tmdb:", "tt"] : ["tmdb:"],
+8 -4
View File
@@ -65,7 +65,6 @@ const buildMovieResponse = async (res, type, language, tmdbId, rpdbkey) => {
return {
imdb_id: res.imdb_id,
cast: Utils.parseCast(res.credits),
country: Utils.parseCoutry(res.production_countries),
description: res.overview,
director: Utils.parseDirector(res.credits),
@@ -90,7 +89,10 @@ const buildMovieResponse = async (res, type, language, tmdbId, rpdbkey) => {
defaultVideoId: res.imdb_id ? res.imdb_id : `tmdb:${res.id}`,
hasScheduledVideos: false
},
logo: processLogo(logo)
logo: processLogo(logo),
app_extras: {
cast: Utils.parseCast(res.credits)
}
};
};
@@ -124,7 +126,6 @@ const buildTvResponse = async (res, type, language, tmdbId, rpdbkey, config) =>
const imdbRating = imdbRatingRaw || res.vote_average?.toFixed(1) || "N/A";
return {
cast: Utils.parseCast(res.credits),
country: Utils.parseCoutry(res.production_countries),
description: res.overview,
genre: Utils.parseGenres(res.genres),
@@ -151,7 +152,10 @@ const buildTvResponse = async (res, type, language, tmdbId, rpdbkey, config) =>
defaultVideoId: null,
hasScheduledVideos: true
},
logo: processLogo(logo)
logo: processLogo(logo),
app_extras: {
cast: Utils.parseCast(res.credits)
}
};
};
+10 -5
View File
@@ -7,8 +7,12 @@ function parseCertification(release_dates, language) {
}
function parseCast(credits) {
return credits.cast.slice(0, 4).map((el) => {
return el.name;
return credits.cast.map((el) => {
return {
name: el.name,
character: el.character,
photo: el.profile_path ? `https://image.tmdb.org/t/p/w276_and_h350_face${el.profile_path}` : null
};
});
}
@@ -88,11 +92,12 @@ function parseGenreLink(genres, type, language) {
}
function parseCreditsLink(credits) {
const Cast = parseCast(credits).map((actor) => {
const castData = parseCast(credits);
const Cast = castData.map((actor) => {
return {
name: actor,
name: actor.name,
category: "Cast",
url: `stremio:///search?search=${encodeURIComponent(actor)}`,
url: `stremio:///search?search=${encodeURIComponent(actor.name)}`
};
});
const Director = parseDirector(credits).map((director) => {
+10
View File
@@ -0,0 +1,10 @@
version: '3'
services:
tmdb-addon:
build: .
container_name: tmdb-addon
ports:
- "3000:3000"
env_file:
- .env
restart: unless-stopped