mirror of
https://github.com/Viren070/tmdb-addon.git
synced 2025-12-01 23:18:11 +01:00
feat: cast images
This commit is contained in:
@@ -176,8 +176,8 @@ async function getManifest(config) {
|
|||||||
favicon: `${process.env.HOST_NAME}/favicon.png`,
|
favicon: `${process.env.HOST_NAME}/favicon.png`,
|
||||||
logo: `${process.env.HOST_NAME}/logo.png`,
|
logo: `${process.env.HOST_NAME}/logo.png`,
|
||||||
background: `${process.env.HOST_NAME}/background.png`,
|
background: `${process.env.HOST_NAME}/background.png`,
|
||||||
name: "The Movie Database Addon",
|
name: "The Movie Database",
|
||||||
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,
|
description: "Fork of the TMDB addon for use with Omni (https://omni.stkc.win). Current settings: " + activeConfigs,
|
||||||
resources: ["catalog", "meta"],
|
resources: ["catalog", "meta"],
|
||||||
types: ["movie", "series"],
|
types: ["movie", "series"],
|
||||||
idPrefixes: provideImdbId ? ["tmdb:", "tt"] : ["tmdb:"],
|
idPrefixes: provideImdbId ? ["tmdb:", "tt"] : ["tmdb:"],
|
||||||
|
|||||||
@@ -65,7 +65,6 @@ const buildMovieResponse = async (res, type, language, tmdbId, rpdbkey) => {
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
imdb_id: res.imdb_id,
|
imdb_id: res.imdb_id,
|
||||||
cast: Utils.parseCast(res.credits),
|
|
||||||
country: Utils.parseCoutry(res.production_countries),
|
country: Utils.parseCoutry(res.production_countries),
|
||||||
description: res.overview,
|
description: res.overview,
|
||||||
director: Utils.parseDirector(res.credits),
|
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}`,
|
defaultVideoId: res.imdb_id ? res.imdb_id : `tmdb:${res.id}`,
|
||||||
hasScheduledVideos: false
|
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";
|
const imdbRating = imdbRatingRaw || res.vote_average?.toFixed(1) || "N/A";
|
||||||
|
|
||||||
return {
|
return {
|
||||||
cast: Utils.parseCast(res.credits),
|
|
||||||
country: Utils.parseCoutry(res.production_countries),
|
country: Utils.parseCoutry(res.production_countries),
|
||||||
description: res.overview,
|
description: res.overview,
|
||||||
genre: Utils.parseGenres(res.genres),
|
genre: Utils.parseGenres(res.genres),
|
||||||
@@ -151,7 +152,10 @@ const buildTvResponse = async (res, type, language, tmdbId, rpdbkey, config) =>
|
|||||||
defaultVideoId: null,
|
defaultVideoId: null,
|
||||||
hasScheduledVideos: true
|
hasScheduledVideos: true
|
||||||
},
|
},
|
||||||
logo: processLogo(logo)
|
logo: processLogo(logo),
|
||||||
|
app_extras: {
|
||||||
|
cast: Utils.parseCast(res.credits)
|
||||||
|
}
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -7,8 +7,12 @@ function parseCertification(release_dates, language) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function parseCast(credits) {
|
function parseCast(credits) {
|
||||||
return credits.cast.slice(0, 4).map((el) => {
|
return credits.cast.map((el) => {
|
||||||
return el.name;
|
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) {
|
function parseCreditsLink(credits) {
|
||||||
const Cast = parseCast(credits).map((actor) => {
|
const castData = parseCast(credits);
|
||||||
|
const Cast = castData.map((actor) => {
|
||||||
return {
|
return {
|
||||||
name: actor,
|
name: actor.name,
|
||||||
category: "Cast",
|
category: "Cast",
|
||||||
url: `stremio:///search?search=${encodeURIComponent(actor)}`,
|
url: `stremio:///search?search=${encodeURIComponent(actor.name)}`
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
const Director = parseDirector(credits).map((director) => {
|
const Director = parseDirector(credits).map((director) => {
|
||||||
|
|||||||
@@ -0,0 +1,10 @@
|
|||||||
|
version: '3'
|
||||||
|
services:
|
||||||
|
tmdb-addon:
|
||||||
|
build: .
|
||||||
|
container_name: tmdb-addon
|
||||||
|
ports:
|
||||||
|
- "3000:3000"
|
||||||
|
env_file:
|
||||||
|
- .env
|
||||||
|
restart: unless-stopped
|
||||||
Reference in New Issue
Block a user