From 046a2ca4bd033a87ec3793b72d6ed8340890dfb1 Mon Sep 17 00:00:00 2001 From: lyz05 <294068487@qq.com> Date: Fri, 17 Oct 2025 14:51:06 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0=E8=B6=85=E9=93=BE?= =?UTF-8?q?=E6=8E=A5=E8=B7=B3=E8=BD=AC=E5=88=B0=E8=A7=86=E9=A2=91=E7=BD=91?= =?UTF-8?q?=E7=AB=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- routes/danmaku.js | 2 ++ views/danmaku.ejs | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/routes/danmaku.js b/routes/danmaku.js index d7bfeae..860e292 100644 --- a/routes/danmaku.js +++ b/routes/danmaku.js @@ -92,6 +92,7 @@ async function resolve(req, res) { async function index(req, res) { const urls = list.map(item => item.example_urls[0]); const names = list.map(item => item.name); + const domains = list.map(item => item.domain); const path = req.protocol + "://" + req.headers.host + req.originalUrl; const resolve_info = await db.accessCountQuery() const hotlist = await db.hotlistQuery() @@ -99,6 +100,7 @@ async function index(req, res) { path, urls, names, + domains, resolve_info, hotlist }); diff --git a/views/danmaku.ejs b/views/danmaku.ejs index 64eb0eb..d4b8a2e 100644 --- a/views/danmaku.ejs +++ b/views/danmaku.ejs @@ -22,7 +22,7 @@ 使用方法:在当前页面添加一个查询字符串url
目前支持 <% names.forEach(function(name, idx) { %> - <%= name %><% if(idx !== names.length - 1) { %>,<% } %> + <%= name %><% if (idx !== names.length - 1) { %>,<% } %> <% }); %>。
注意:目前只支持单个视频的解析,不支持专辑的解析。