From 6b3a4289fd326b55d2d5aa44758af90ddf768962 Mon Sep 17 00:00:00 2001 From: woleigedouer <38418090+woleigedouer@users.noreply.github.com> Date: Fri, 17 Oct 2025 15:39:04 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20SenPlayer=20?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E6=98=BE=E7=A4=BA=20Tencent=20=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E6=BA=90=E5=89=A7=E9=9B=86=E5=88=97=E8=A1=A8=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98=20(#54)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: 修复 SenPlayer 无法显示 Tencent 数据源剧集列表的问题 - 问题: SenPlayer 客户端无法显示 Tencent 数据源的剧集列表 - 原因: Tencent 使用字符串类型的 mediaId (如 'mzc00200aaogpgh'),而 SenPlayer 期望数字类型的 animeId - 解决: 在 handleTencentAnimes 函数中使用 convertToAsciiSum() 哈希函数将字符串 mediaId 转换为数字 animeId - 影响: 修复后 SenPlayer 可以正常显示 Tencent 数据源的 116 集剧集列表 - 兼容性: 保持 bangumiId 为原始字符串 mediaId,确保内部查询功能不受影响 * fix: 缩短 Tencent 数据源的剧集标题长度 - 问题: Tencent 数据源的剧集标题过长,包含动漫名称和年份 - 影响: 选集时标题过长导致看不到第几集 - 解决: 删除标题中的 anime.title 和 anime.year,只保留平台标识和集数 - 格式: 从 '【tencent】遮天(2023) #遮天_01#' 改为 '【tencent】 #遮天_01#' - 对齐: 与其他数据源 (360/VOD/Renren/Hanjutv/Bahamut) 的标题格式保持一致 * Update worker.js --- danmu_api/worker.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/danmu_api/worker.js b/danmu_api/worker.js index 9b4b35e..2b2b379 100644 --- a/danmu_api/worker.js +++ b/danmu_api/worker.js @@ -1,6 +1,6 @@ // 全局状态(Cloudflare 和 Vercel 都可能重用实例) // ⚠️ 不是持久化存储,每次冷启动会丢失 -const VERSION = "1.3.3"; +const VERSION = "1.3.4"; let animes = []; let episodeIds = []; let episodeNum = 10001; // 全局变量,用于自增 ID @@ -4168,14 +4168,15 @@ async function handleTencentAnimes(animesTencent, queryTitle, curAnimes) { links.push({ "name": i + 1, "url": fullUrl, - "title": `【tencent】${anime.title}(${anime.year}) #${epTitle}#` + "title": `【tencent】 #${epTitle}#` }); } if (links.length > 0) { - // 直接使用mediaId作为animeId和bangumiId + // 将字符串mediaId转换为数字ID (使用哈希函数) + const numericAnimeId = convertToAsciiSum(anime.mediaId); let transformedAnime = { - animeId: anime.mediaId, + animeId: numericAnimeId, bangumiId: anime.mediaId, animeTitle: `${anime.title}(${anime.year})【${anime.type}】from tencent`, type: anime.type,