修复韩剧tv(韩小圈)弹幕源在hills和AfuseKt的问题

This commit is contained in:
huangxd- committed 2025-10-02 22:24:47 +08:00
1 parent 5171832949
commit e217c87df4
1 file changed
+6 -2
+6 -2
View File
@@ -1,6 +1,6 @@
// 全局状态(Cloudflare 和 Vercel 都可能重用实例)
// ⚠️ 不是持久化存储,每次冷启动会丢失
const VERSION = "1.2.1";
const VERSION = "1.2.2";
let animes = [];
let episodeIds = [];
let episodeNum = 10001; // 全局变量,用于自增 ID
@@ -987,7 +987,9 @@ function convertToAsciiSum(sid) {
for (let i = 0; i < sid.length; i++) {
hash = (hash * 33) ^ sid.charCodeAt(i);
}
return hash >>> 0;
hash = (hash >>> 0) % 9999999;
// 确保至少 5 位
return hash < 10000 ? hash + 10000 : hash;
}
function canConvertToNumber(url) {
@@ -3594,6 +3596,8 @@ async function handleRequest(req, env) {
let path = url.pathname;
const method = req.method;
log("info", `request url: ${JSON.stringify(url)}`);
function handleHomepage() {
log("log", "Accessed homepage with repository information");
return jsonResponse({