mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-05-27 11:19:45 +08:00
优化图片地址获取逻辑:在使用图片缓存时增加登录状态检查,移除对doubanio.com的代理处理
This commit is contained in:
@@ -130,11 +130,8 @@ function preloadImage(url: string): Promise<boolean> {
|
||||
// 计算图片地址
|
||||
function getImgUrl(url: string) {
|
||||
// 使用图片缓存
|
||||
if (globalSettings.GLOBAL_IMAGE_CACHE)
|
||||
if (globalSettings.GLOBAL_IMAGE_CACHE && isLogin.value)
|
||||
return `${import.meta.env.VITE_API_BASE_URL}system/cache/image?url=${encodeURIComponent(url)}`
|
||||
// 如果地址中包含douban则使用中转代理
|
||||
if (url.includes('doubanio.com'))
|
||||
return `${import.meta.env.VITE_API_BASE_URL}system/img/0?imgurl=${encodeURIComponent(url)}`
|
||||
return url
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user