2 Commits

Author SHA1 Message Date
shinya
af8caa23be 移除失效豆瓣图片来源 2026-03-15 23:05:59 +08:00
shinya
31653c1dd7 release 100.1.1 2026-02-27 22:00:32 +08:00
8 changed files with 47 additions and 23 deletions

View File

@@ -1,3 +1,9 @@
## [100.1.2] - 2026-03-15
### Changed
- 移除豆瓣图片代理中的「直连」和「豆瓣官方精品 CDN」选项历史数据自动兼容为服务器代理
## [100.1.1] - 2026-02-27
### Changed

View File

@@ -1 +1 @@
100.1.1
100.1.2

View File

@@ -195,18 +195,20 @@ function main() {
fs.writeFileSync(outputPath, tsContent, 'utf-8');
// 读取 VERSION.txt 并同步到 version.ts
const versionTxtPath = path.join(process.cwd(), 'VERSION.txt');
const versionFromFile = fs.readFileSync(versionTxtPath, 'utf8').trim();
console.log(`📄 VERSION.txt 版本: ${versionFromFile}`);
updateVersionTs(versionFromFile);
// 检查是否在 GitHub Actions 环境中运行
const isGitHubActions = process.env.GITHUB_ACTIONS === 'true';
if (isGitHubActions) {
// 在 GitHub Actions 中,更新版本文件
console.log('正在更新版本文件...');
// 在 GitHub Actions 中,更新 VERSION.txt 为 CHANGELOG 最新版本
console.log('正在更新 VERSION.txt...');
updateVersionFile(latestVersion);
updateVersionTs(latestVersion);
} else {
// 在本地运行时,只提示但不更新版本文件
console.log('🔧 本地运行模式:跳过版本文件更新');
console.log('💡 版本文件更新将在 git tag 触发的 release 工作流中完成');
}
console.log(`✅ 成功生成 ${outputPath}`);

View File

@@ -3416,9 +3416,7 @@ const SiteConfigComponent = ({ config, refreshConfig }: { config: AdminConfig |
// 豆瓣图片代理选项
const doubanImageProxyTypeOptions = [
{ value: 'direct', label: '直连(浏览器直接请求豆瓣)' },
{ value: 'server', label: '服务器代理(由服务器代理请求豆瓣)' },
{ value: 'img3', label: '豆瓣官方精品 CDN阿里云' },
{
value: 'cmliussss-cdn-tencent',
label: '豆瓣 CDN By CMLiussss腾讯云',
@@ -3453,7 +3451,9 @@ const SiteConfigComponent = ({ config, refreshConfig }: { config: AdminConfig |
DoubanProxyType: config.SiteConfig.DoubanProxyType || 'cmliussss-cdn-tencent',
DoubanProxy: config.SiteConfig.DoubanProxy || '',
DoubanImageProxyType:
config.SiteConfig.DoubanImageProxyType || 'cmliussss-cdn-tencent',
(config.SiteConfig.DoubanImageProxyType === 'direct' || config.SiteConfig.DoubanImageProxyType === 'img3')
? 'server'
: (config.SiteConfig.DoubanImageProxyType || 'cmliussss-cdn-tencent'),
DoubanImageProxy: config.SiteConfig.DoubanImageProxy || '',
DisableYellowFilter: config.SiteConfig.DisableYellowFilter || false,
FluidSearch: config.SiteConfig.FluidSearch || true,

View File

@@ -88,9 +88,7 @@ export const UserMenu: React.FC = () => {
// 豆瓣图片代理选项
const doubanImageProxyTypeOptions = [
{ value: 'direct', label: '直连(浏览器直接请求豆瓣)' },
{ value: 'server', label: '服务器代理(由服务器代理请求豆瓣)' },
{ value: 'img3', label: '豆瓣官方精品 CDN阿里云' },
{
value: 'cmliussss-cdn-tencent',
label: '豆瓣 CDN By CMLiussss腾讯云',
@@ -159,10 +157,13 @@ export const UserMenu: React.FC = () => {
);
const defaultDoubanImageProxyType =
(window as any).RUNTIME_CONFIG?.DOUBAN_IMAGE_PROXY_TYPE || 'cmliussss-cdn-tencent';
// 兼容历史数据:直连和豆瓣官方精品 CDN 统一使用服务器代理
const normalizeImageProxyType = (type: string) =>
type === 'direct' || type === 'img3' ? 'server' : type;
if (savedDoubanImageProxyType !== null) {
setDoubanImageProxyType(savedDoubanImageProxyType);
setDoubanImageProxyType(normalizeImageProxyType(savedDoubanImageProxyType));
} else if (defaultDoubanImageProxyType) {
setDoubanImageProxyType(defaultDoubanImageProxyType);
setDoubanImageProxyType(normalizeImageProxyType(defaultDoubanImageProxyType));
}
const savedDoubanImageProxyUrl = localStorage.getItem(
@@ -422,8 +423,11 @@ export const UserMenu: React.FC = () => {
(window as any).RUNTIME_CONFIG?.DOUBAN_PROXY_TYPE || 'cmliussss-cdn-tencent';
const defaultDoubanProxy =
(window as any).RUNTIME_CONFIG?.DOUBAN_PROXY || '';
const defaultDoubanImageProxyType =
let defaultDoubanImageProxyType =
(window as any).RUNTIME_CONFIG?.DOUBAN_IMAGE_PROXY_TYPE || 'cmliussss-cdn-tencent';
if (defaultDoubanImageProxyType === 'direct' || defaultDoubanImageProxyType === 'img3') {
defaultDoubanImageProxyType = 'server';
}
const defaultDoubanImageProxyUrl =
(window as any).RUNTIME_CONFIG?.DOUBAN_IMAGE_PROXY || '';
const defaultFluidSearch =

View File

@@ -10,6 +10,19 @@ export interface ChangelogEntry {
}
export const changelog: ChangelogEntry[] = [
{
version: "100.1.2",
date: "2026-03-15",
added: [
// 无新增内容
],
changed: [
"移除豆瓣图片代理中的「直连」和「豆瓣官方精品 CDN」选项历史数据自动兼容为服务器代理"
],
fixed: [
// 无修复内容
]
},
{
version: "100.1.1",
date: "2026-02-27",

View File

@@ -4,18 +4,20 @@ import Hls from 'hls.js';
function getDoubanImageProxyConfig(): {
proxyType:
| 'direct'
| 'server'
| 'img3'
| 'cmliussss-cdn-tencent'
| 'cmliussss-cdn-ali'
| 'custom';
proxyUrl: string;
} {
const doubanImageProxyType =
let doubanImageProxyType =
localStorage.getItem('doubanImageProxyType') ||
(window as any).RUNTIME_CONFIG?.DOUBAN_IMAGE_PROXY_TYPE ||
'cmliussss-cdn-tencent';
// 兼容历史数据:直连和豆瓣官方精品 CDN 统一使用服务器代理
if (doubanImageProxyType === 'direct' || doubanImageProxyType === 'img3') {
doubanImageProxyType = 'server';
}
const doubanImageProxy =
localStorage.getItem('doubanImageProxyUrl') ||
(window as any).RUNTIME_CONFIG?.DOUBAN_IMAGE_PROXY ||
@@ -41,8 +43,6 @@ export function processImageUrl(originalUrl: string): string {
switch (proxyType) {
case 'server':
return `/api/image-proxy?url=${encodeURIComponent(originalUrl)}`;
case 'img3':
return originalUrl.replace(/img\d+\.doubanio\.com/g, 'img3.doubanio.com');
case 'cmliussss-cdn-tencent':
return originalUrl.replace(
/img\d+\.doubanio\.com/g,
@@ -55,9 +55,8 @@ export function processImageUrl(originalUrl: string): string {
);
case 'custom':
return `${proxyUrl}${encodeURIComponent(originalUrl)}`;
case 'direct':
default:
return originalUrl;
return `/api/image-proxy?url=${encodeURIComponent(originalUrl)}`;
}
}

View File

@@ -1,6 +1,6 @@
/* eslint-disable no-console */
const CURRENT_VERSION = '100.1.0';
const CURRENT_VERSION = '100.1.2';
// 导出当前版本号供其他地方使用
export { CURRENT_VERSION };