视频源增加代理开关

This commit is contained in:
mtvpls
2025-12-28 21:01:49 +08:00
parent dd6d2e802c
commit d821c0bd7e
11 changed files with 518 additions and 4 deletions
+1
View File
@@ -72,6 +72,7 @@ export interface AdminConfig {
detail?: string;
from: 'config' | 'custom';
disabled?: boolean;
proxyMode?: boolean; // 代理模式开关:启用后由服务器代理m3u8和ts分片
}[];
CustomCategories: {
name?: string;
+3
View File
@@ -9,6 +9,7 @@ export interface ApiSite {
api: string;
name: string;
detail?: string;
proxyMode?: boolean;
}
export interface LiveCfg {
@@ -522,6 +523,7 @@ export async function getAvailableApiSites(user?: string): Promise<ApiSite[]> {
name: s.name,
api: s.api,
detail: s.detail,
proxyMode: s.proxyMode,
}));
}
@@ -543,6 +545,7 @@ export async function getAvailableApiSites(user?: string): Promise<ApiSite[]> {
name: s.name,
api: s.api,
detail: s.detail,
proxyMode: s.proxyMode,
}));
}
}
+3
View File
@@ -117,6 +117,7 @@ async function searchWithCache(
douban_id: item.vod_douban_id,
vod_remarks: item.vod_remarks,
vod_total: item.vod_total,
proxyMode: apiSite.proxyMode || false,
};
});
@@ -288,6 +289,7 @@ export async function getDetailFromApi(
douban_id: videoDetail.vod_douban_id,
vod_remarks: videoDetail.vod_remarks,
vod_total: videoDetail.vod_total,
proxyMode: apiSite.proxyMode || false,
};
}
@@ -370,5 +372,6 @@ async function handleSpecialSourceDetail(
douban_id: 0,
vod_remarks: undefined,
vod_total: undefined,
proxyMode: apiSite.proxyMode || false,
};
}
+1
View File
@@ -128,6 +128,7 @@ export interface SearchResult {
douban_id?: number;
vod_remarks?: string; // 视频备注信息(如"全80集"、"更新至25集"等)
vod_total?: number; // 总集数
proxyMode?: boolean; // 代理模式:启用后由服务器代理m3u8和ts分片
}
// 豆瓣数据结构