支持自定义tmdb图片baseurl

This commit is contained in:
mtvpls
2026-01-17 20:26:09 +08:00
parent be8373de40
commit 837e862d75
5 changed files with 59 additions and 10 deletions

View File

@@ -403,7 +403,10 @@ export function getTMDBImageUrl(
size: string = 'w500'
): string {
if (!path) return '';
return `https://image.tmdb.org/t/p/${size}${path}`;
const baseUrl = typeof window !== 'undefined'
? localStorage.getItem('tmdbImageBaseUrl') || 'https://image.tmdb.org'
: 'https://image.tmdb.org';
return `${baseUrl}/t/p/${size}${path}`;
}
/**

View File

@@ -226,5 +226,8 @@ export function getTMDBImageUrl(
return path;
}
return `https://image.tmdb.org/t/p/${size}${path}`;
const baseUrl = typeof window !== 'undefined'
? localStorage.getItem('tmdbImageBaseUrl') || 'https://image.tmdb.org'
: 'https://image.tmdb.org';
return `${baseUrl}/t/p/${size}${path}`;
}