完善tmdb反代
This commit is contained in:
@@ -7,6 +7,7 @@ import { CheckCircle, AlertCircle, Plus } from 'lucide-react';
|
||||
|
||||
import PageLayout from '@/components/PageLayout';
|
||||
import { getTMDBImageUrl } from '@/lib/tmdb.client';
|
||||
import { processImageUrl } from '@/lib/utils';
|
||||
|
||||
interface TMDBResult {
|
||||
id: number;
|
||||
@@ -117,7 +118,7 @@ export default function MovieRequestPage() {
|
||||
const submitRequest = async (item: TMDBResult, season?: number) => {
|
||||
setSubmitting(true);
|
||||
try {
|
||||
let poster = item.poster_path ? getTMDBImageUrl(item.poster_path, 'w500') : undefined;
|
||||
let poster = item.poster_path ? processImageUrl(getTMDBImageUrl(item.poster_path, 'w500')) : undefined;
|
||||
let title = item.title || item.name || '';
|
||||
|
||||
if (season && seasons.length > 0) {
|
||||
@@ -125,7 +126,7 @@ export default function MovieRequestPage() {
|
||||
if (seasonData) {
|
||||
title = `${title} ${seasonData.name}`;
|
||||
if (seasonData.poster_path) {
|
||||
poster = getTMDBImageUrl(seasonData.poster_path, 'w500');
|
||||
poster = processImageUrl(getTMDBImageUrl(seasonData.poster_path, 'w500'));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -311,7 +312,7 @@ export default function MovieRequestPage() {
|
||||
>
|
||||
{item.poster_path ? (
|
||||
<img
|
||||
src={getTMDBImageUrl(item.poster_path, 'w500')}
|
||||
src={processImageUrl(getTMDBImageUrl(item.poster_path, 'w500'))}
|
||||
alt={item.title || item.name}
|
||||
className='w-full aspect-[2/3] object-cover'
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user