tmdb支持设置baseurl
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user