♻️ 书源 id 去掉 ext. 前缀,沿用旧内置源数据

Co-authored-by: Copilot <[email protected]>
This commit is contained in:
GarfieldandCopilot committed 2026-11-16 14:07:45 +08:00
1 parent 85dd9c6c6b
commit 90461c8c06
11 files changed
+16 -16

No files matched your search

+4 -4
View File
@@ -41,12 +41,12 @@ package.loaded["moonsource_jjwxc.client"] = {
if #requests == 1 then cb(Mapper.category(html))
elseif mode == "oversized" then
cb({ page = params.page, pages = 3, books = {
{ source_id = "ext.jjwxc", stable_id = "201" },
{ source_id = "ext.jjwxc", stable_id = "202" },
{ source_id = "ext.jjwxc", stable_id = "203" },
{ source_id = "jjwxc", stable_id = "201" },
{ source_id = "jjwxc", stable_id = "202" },
{ source_id = "jjwxc", stable_id = "203" },
} })
elseif mode == "sync" then
cb({ page = params.page, pages = 3, books = { { source_id = "ext.jjwxc", stable_id = tostring(params.page) } } })
cb({ page = params.page, pages = 3, books = { { source_id = "jjwxc", stable_id = tostring(params.page) } } })
end
return request
end,
+2 -2
View File
@@ -71,7 +71,7 @@ local function vipToc()
{ uid = "2", idx = 2, title = "二", vip = true, toc_version = 7 },
}
end
local identity = { source_id = "ext.jjwxc", stable_id = "9" }
local identity = { source_id = "jjwxc", stable_id = "9" }
-- 缓存命中:开探测;同一本书再问不重开;问完一次性写回
do
@@ -126,7 +126,7 @@ do
local src = Jjwxc.new()
src:loadTocAsync(identity, function() end)
Stubs.flush()
src:loadTocAsync({ source_id = "ext.jjwxc", stable_id = "10" }, function() end)
src:loadTocAsync({ source_id = "jjwxc", stable_id = "10" }, function() end)
Stubs.flush()
Assert.is_true(pending[1].cancelled)
Assert.eq(src.probe.stable_id, "10")
+2 -2
View File
@@ -275,7 +275,7 @@ end
do
local Settings = require("utils.settings")
local Protocols = require("moonsource_jjwxc.protocols")
local cfg = Settings.getSource("ext.jjwxc")
local cfg = Settings.getSource("jjwxc")
cfg.cookie, cfg.token, cfg.protocol = nil, nil, nil
Assert.is_nil(Protocols.current())
cfg.token = "t"
@@ -294,7 +294,7 @@ end
do
local Settings = require("utils.settings")
local Protocols = require("moonsource_jjwxc.protocols")
local cfg = Settings.getSource("ext.jjwxc")
local cfg = Settings.getSource("jjwxc")
cfg.cookie, cfg.token, cfg.protocol = nil, nil, nil
Assert.eq(select(1, Protocols.list[1].commentAuth()), "")
Assert.is_nil(select(2, Protocols.list[1].commentAuth()).Cookie)
+1 -1
View File
@@ -78,7 +78,7 @@ source.loadTocAsync = function(_self, _identity, cb)
cb({ { uid = "23" } })
return { cancel = function() error("不应取消已完成目录请求") end }
end
local identity = { source_id = "ext.jjwxc", stable_id = "9", chapter_idx = 1 }
local identity = { source_id = "jjwxc", stable_id = "9", chapter_idx = 1 }
source:paragraphHotspotsAsync(identity, function(value) called = value end)
Assert.len(called, 1)
Assert.eq(called[1].range, "6")