♻️ 书源 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 730b2d6d9f
commit 1acdc500ca
7 files changed
+7 -7

No files matched your search

@@ -7,7 +7,7 @@
local _ = require("l10n").get("moonsource_qqreader")
return {
id = "ext.qqreader",
id = "qqreader",
name = _("QQ阅读"),
type = "chapter",
description = _("QQ阅读书架与在线阅读"),
@@ -21,7 +21,7 @@ local _ = require("l10n").get("moonsource_qqreader")
local Client = {}
local SOURCE_ID = "ext.qqreader"
local SOURCE_ID = "qqreader"
local WEB = "https://book.qq.com"
local API = WEB .. "/api"
local UA = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) "
@@ -11,7 +11,7 @@ local Text = require("utils.text")
local Mapper = {}
local SOURCE_ID = "ext.qqreader"
local SOURCE_ID = "qqreader"
local COVER = "https://wfqqreader-1252317822.image.myqcloud.com/cover/%d/%s/b_%s.jpg"
--- 搜索结果页(SSR HTML)→ Book[]:每条是 `<a title=书名 href=…/book-detail/书号>` 后跟简介段。
@@ -11,7 +11,7 @@ book.qq.com 下的 HTTPS,不能指到 passport。书架页未登录也是 200
local _ = require("l10n").get("moonsource_qqreader")
local CookieLogin = require("source.cookie_login")
local SOURCE_ID = "ext.qqreader"
local SOURCE_ID = "qqreader"
local Setting = {}
---@return boolean
+1 -1
View File
@@ -28,7 +28,7 @@ package.preload["moonsource_qqreader.client"] = function()
}
end
local source = require("moonsource_qqreader.source").new()
local identity = { source_id = "ext.qqreader", stable_id = "9" }
local identity = { source_id = "qqreader", stable_id = "9" }
do
source.loadTocAsync = function(_self, _identity, cb)
+1 -1
View File
@@ -29,7 +29,7 @@ package.preload["moonsource_qqreader.client"] = function()
requests[#requests + 1] = path
local idx, page = #requests, tonumber(path:match("(%d+)$"))
local books = {}
for item = 1, 20 do books[item] = { source_id = "ext.qqreader", stable_id = tostring((page - 1) * 20 + item) } end
for item = 1, 20 do books[item] = { source_id = "qqreader", stable_id = tostring((page - 1) * 20 + item) } end
if delayed and page == 2 then late = function() cb(books) end else cb(books) end
return { cancel = function() cancelled[idx] = true end }
end }
+1 -1
View File
@@ -24,7 +24,7 @@ end
package.preload["reader.session"] = function() return { current = function() return nil end } end
package.preload["book.books_db"] = function()
return { prepareAccountSync = function(id, shelf_add)
Assert.eq(id, "ext.qqreader")
Assert.eq(id, "qqreader")
Assert.is_true(shelf_add)
Assert.eq(cfg.cookie, "old")
prepared = prepared + 1