Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion danmu_api/configs/globals.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const Globals = {
accessedEnvVars: {},

// 静态常量
VERSION: '1.15.3',
VERSION: '1.15.4',
MAX_LOGS: 1000, // 日志存储,最多保存 1000 行
MAX_ANIMES: 100,
MAX_RECORDS: 100, // 请求记录最大数量
Expand Down
4 changes: 2 additions & 2 deletions danmu_api/utils/danmu-util.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export function groupDanmusByMinute(filteredDanmus, n) {
cid: data.cid,
p: data.p,
// 仅当计算后的逻辑计数大于1时才显示 "x N"
m: displayCount > 1 ? `${message} x ${displayCount}` : message,
m: displayCount > 1 ? `${message}\u200Ax\u200A${displayCount}` : message,
t: data.earliestT,
like: data.like // 包含合并后的like字段
};
Expand Down Expand Up @@ -143,7 +143,7 @@ export function handleDanmusLike(groupedDanmus) {
}

// 在弹幕内容m字段后面添加点赞信息
const likeText = `${icon}${formattedLike}`;
const likeText = `\u200A${icon}${formattedLike}`;
const newM = item.m + likeText;

// 创建新对象,复制原属性,更新m字段,并删除like字段
Expand Down
3 changes: 2 additions & 1 deletion danmu_api/utils/local-redis-util.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { globals } from '../configs/globals.js';
import { log } from './log-util.js';
import { simpleHash, serializeValue } from "./codec-util.js";
import { createClient } from 'redis';

// =====================
// 本地 Redis 读写请求
Expand All @@ -22,6 +21,8 @@ async function createLocalRedisClient() {

try {
log("info", `[local-redis] 正在连接本地 Redis`);

const { createClient } = await import('redis');

localRedisClient = createClient({
url: localRedisUrl,
Expand Down