♻️ 书源 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 01e572a5ee
commit f8ad3f73a6
29 files changed
+173 -173

No files matched your search

@@ -207,7 +207,7 @@ function Chapter.primeBatchAsync(bookId, chapters, opts, cb)
end
local param = Package.formatChaptersParam(uids)
return downloadPackageAsync(bookId, param, book_type, function(files)
local work_dir = Paths.bookWorkDir(bookId, "ext.weread")
local work_dir = Paths.bookWorkDir(bookId, "weread")
Paths.ensureDir(work_dir .. "/images")
for name, data in pairs(files) do
local base = name:match("^Images/([^/]+)$")
@@ -399,7 +399,7 @@ Chapter._noteTexts = noteTexts
---@return string[] uids
local function noteChapterUids(bookId)
local uids = {}
for _idx, ch in ipairs(Toc.read("ext.weread", bookId) or {}) do
for _idx, ch in ipairs(Toc.read("weread", bookId) or {}) do
if tostring(ch.title or ""):find("注", 1, true) then uids[#uids + 1] = ch.uid end
end
return uids
@@ -411,7 +411,7 @@ local note_files = {}
---@param bookId string
---@return string
local function notesPath(bookId)
return Paths.bookWorkDir(bookId, "ext.weread") .. "/notes.json"
return Paths.bookWorkDir(bookId, "weread") .. "/notes.json"
end
---@param bookId string
@@ -537,7 +537,7 @@ function Chapter.fetchContentAsync(bookId, chapter, cb)
cb({ title = title, html = "<h1>" .. Text.xmlEscape(title) .. "</h1>" .. html })
return
end
local work_dir = Paths.bookWorkDir(bookId, "ext.weread")
local work_dir = Paths.bookWorkDir(bookId, "weread")
asset_job = Assets.localizeAsync(bookId, chapter, html, reader_url, function(done)
-- 章包里已有样式就不再打整书包;整书包才带公共背景图。
if type(style) == "string" and style ~= "" then