tmdb支持设置baseurl

This commit is contained in:
mtvpls
2026-01-17 18:04:58 +08:00
parent 9b7eb719a2
commit be8373de40
9 changed files with 95 additions and 31 deletions
+4 -3
View File
@@ -62,6 +62,7 @@ export async function GET(request: NextRequest) {
const config = await getConfig();
const tmdbApiKey = config.SiteConfig.TMDBApiKey;
const tmdbProxy = config.SiteConfig.TMDBProxy;
const tmdbReverseProxy = config.SiteConfig.TMDBReverseProxy;
if (!tmdbApiKey) {
return NextResponse.json(
@@ -90,7 +91,7 @@ export async function GET(request: NextRequest) {
mediaType = cached.data.mediaType;
} else {
// 搜索TMDB
const searchResult = await searchTMDBMulti(tmdbApiKey, cleanedTitle, tmdbProxy);
const searchResult = await searchTMDBMulti(tmdbApiKey, cleanedTitle, tmdbProxy, tmdbReverseProxy);
if (searchResult.code !== 200 || !searchResult.results.length) {
return NextResponse.json(
@@ -145,8 +146,8 @@ export async function GET(request: NextRequest) {
// 获取推荐
const recommendationsResult =
mediaType === 'movie'
? await getTMDBMovieRecommendations(tmdbApiKey, tmdbId, tmdbProxy)
: await getTMDBTVRecommendations(tmdbApiKey, tmdbId, tmdbProxy);
? await getTMDBMovieRecommendations(tmdbApiKey, tmdbId, tmdbProxy, tmdbReverseProxy)
: await getTMDBTVRecommendations(tmdbApiKey, tmdbId, tmdbProxy, tmdbReverseProxy);
if (recommendationsResult.code !== 200) {
return NextResponse.json(