fix: 修复 SenPlayer 无法显示 Tencent 数据源剧集列表的问题 (#54)
* 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
This commit is contained in:
1 parent
2cff9d8f0d
commit
6b3a4289fd
1 file changed
+5
-4
+5
-4
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user