♻️ 书源 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 ff11bb481a
commit 35383a2451
11 files changed
+18 -18

No files matched your search

+2 -2
View File
@@ -44,7 +44,7 @@ package.loaded["http.request"] = {
}
local captured_ops, captured_reuse
local identity = { source_id = "ext.ireader", stable_id = "content-fixture" }
local identity = { source_id = "ireader", stable_id = "content-fixture" }
local chapter = { idx = 1, uid = "1", title = "正文" }
package.loaded["source.chapter"] = {
openAsync = function(_source, ref, _book, _opts, ops, cb)
@@ -93,7 +93,7 @@ Assert.is_false(Text.hasRemoteImageSrc(payload.html))
Assert.eq(#requests, 2, "同一图片只下载一次")
local href = payload.html:match('src="([^"]+)"')
Assert.matches(href, "^images/[a-f0-9]+%.png$")
Assert.eq(Fs.read(require("utils.paths").bookWorkDir(identity.stable_id, "ext.ireader") .. "/" .. href), png)
Assert.eq(Fs.read(require("utils.paths").bookWorkDir(identity.stable_id, "ireader") .. "/" .. href), png)
reset()
local handle = open()