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
+5 -3
View File
@@ -61,6 +61,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(
@@ -94,7 +95,8 @@ export async function GET(request: NextRequest) {
const searchResult = await searchTMDBMulti(
tmdbApiKey,
cleanedTitle,
tmdbProxy
tmdbProxy,
tmdbReverseProxy
);
if (searchResult.code !== 200 || !searchResult.results.length) {
@@ -134,9 +136,9 @@ export async function GET(request: NextRequest) {
// 获取详情
let detailsResult;
if (mediaType === 'movie') {
detailsResult = await getTMDBMovieDetails(tmdbApiKey, tmdbId, tmdbProxy);
detailsResult = await getTMDBMovieDetails(tmdbApiKey, tmdbId, tmdbProxy, tmdbReverseProxy);
} else {
detailsResult = await getTMDBTVDetails(tmdbApiKey, tmdbId, tmdbProxy);
detailsResult = await getTMDBTVDetails(tmdbApiKey, tmdbId, tmdbProxy, tmdbReverseProxy);
}
if (detailsResult.code !== 200 || !detailsResult.details) {