fix(kan360): 修复360看源无法获取个别剧的最新一集 (#317)

This commit is contained in:
Elegy233 authored and GitHub committed 2026-05-25 10:04:42 +08:00
1 parent 379fa7f7ab
commit 184f60e558
1 file changed
+19 -1
+19 -1
View File
@@ -276,9 +276,27 @@ export default class Kan360Source extends BaseSource {
if (globals.vodAllowedPlatforms.includes(anime.seriesSite)) {
for (let i = 0; i < anime.seriesPlaylinks.length; i++) {
const item = anime.seriesPlaylinks[i];
let epUrl = "";
// 适配 seriesPlaylinks 列表中存在的异构数据节点
// 1. 常规节点为包含 url 属性的对象结构
if (item && typeof item === "object") {
epUrl = item.url || "";
}
// 2. 特殊节点为字符串形态的关联链接
// 忽略该关联链接,并从顶层 playlinks 提取当前站点的主链接进行数据映射
else if (typeof item === "string") {
epUrl = (anime.playlinks && anime.playlinks[anime.seriesSite])
? anime.playlinks[anime.seriesSite]
: "";
}
// 过滤无有效 url 的空节点,避免生成非法格式的剧集对象
if (!epUrl) continue;
links.push({
"name": (i + 1).toString(),
"url": item.url,
"url": epUrl,
"title": `【${anime.seriesSite}】 第${i + 1}集`
});
}