js: CD-Aware-AutoGather: 修复跨天运行时logFakeScriptEnd可能影响日志解析的问题 (#1989)

This commit is contained in:
Patrick-Ze
2025-09-24 22:18:54 +08:00
committed by GitHub
parent 3f8f18a8c6
commit 9da98ac9fd
4 changed files with 11 additions and 8 deletions

View File

@@ -1,6 +1,7 @@
{
"rename": {
"起个名字好难": "起个名字好难的喵",
"Patrick-Ze (AyakaMain)": "Ayaka-Main",
"this-Fish": "蜜柑魚"
},
"links": {
@@ -21,9 +22,7 @@
"柒叶子": "https://github.com/5117600049",
"不瘦五十斤不改名": "https://github.com/PanZic",
"½": "https://github.com/Traveler07",
"Patrick-Ze (AyakaMain)": "https://github.com/Patrick-Ze",
"AyakaMain": "https://github.com/Patrick-Ze",
"Patrick-Ze": "https://github.com/Patrick-Ze",
"Ayaka-Main": "https://github.com/Patrick-Ze",
"风埠": "https://github.com/jhkif",
"jbcaaa": "https://github.com/jbcaaa",
"johsang": "https://github.com/johsang",

View File

@@ -7,7 +7,7 @@
let scriptContext = {
scriptStartTime: new Date(),
version: "1.1",
version: "1.2",
};
/**
@@ -504,7 +504,11 @@ function _fakeLogCore(name, isJs = true, dateIn = null) {
let logMessage = "";
let logTime = new Date();
if (isJs && isStart) {
logTime = dateIn;
// 传入开始时间是为了在跟踪路径耗时的同时仍然保留对脚本运行时间的统计
// 但是如果脚本开始时间和结束时间跨天,就不能使用传入时间,否则会影响日志分析(Seconds cannot be negative)
if (logTime.getDay() === dateIn.getDay()) {
logTime = dateIn;
}
}
const ms = logTime.getMilliseconds().toString().padStart(3, "0");

View File

@@ -1,7 +1,7 @@
{
"manifest_version": 1,
"name": "带CD管理的自动采",
"version": "1.7.5",
"name": "带CD管理的自动采",
"version": "1.7.6",
"bgi_version": "0.45.0",
"description": "自动同步你通过BetterGI订阅的地图追踪任务执行采集任务并管理材料刷新时间支持多账号。\n首次使用前请先简单阅读说明可在`全自动`——`JS脚本`页面,点击本脚本名称查看)",
"authors": [

View File

@@ -37,7 +37,7 @@
{
"name": "iHaveMultipleAccounts",
"type": "input-text",
"label": "我肝的账号不止一个\n根据唯一ID区分账号维护对应的材料刷新时间\n填空将使用右下角帐号UID区分账号维护对应的材料刷新时间",
"label": "我肝的账号不止一个\n根据唯一ID区分账号维护对应的材料刷新时间\n留空时将使用右下角UID",
"default": "默认账号"
},
{