♻️ 书源 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 f7c9afb9ca
commit 6f301c2f83
8 files changed
+8 -8

No files matched your search

@@ -9,7 +9,7 @@
local _ = require("l10n").get("moonsource_dedao")
return {
id = "ext.dedao",
id = "dedao",
name = _("得到阅读"),
type = "chapter",
description = _("得到电子书书架与在线阅读"),
@@ -15,7 +15,7 @@ local _ = require("l10n").get("moonsource_dedao")
local Client = {}
local SOURCE_ID = "ext.dedao"
local SOURCE_ID = "dedao"
local ORIGIN = "https://www.dedao.cn"
local LOGIN_EXPIRED = "得到登录已失效,请点「重新登录」,用得到 App 扫码。"
@@ -11,7 +11,7 @@ local Text = require("utils.text")
local Mapper = {}
local SOURCE_ID = "ext.dedao"
local SOURCE_ID = "dedao"
Mapper.TOC_VERSION = 1
local SVG_KEY = "3e4r06tjkpjcevlbslr3d96gdb5ahbmo"
@@ -96,7 +96,7 @@ end
function QRLogin:start()
self:cancel()
local gen = self.generation
local current = require("source.auth").beginLogin("ext.dedao")
local current = require("source.auth").beginLogin("dedao")
self.current = function() return gen == self.generation and current() end
self.jar = {}
local pending = true
@@ -7,7 +7,7 @@
local _ = require("l10n").get("moonsource_dedao")
local CookieLogin = require("source.cookie_login")
local SOURCE_ID = "ext.dedao"
local SOURCE_ID = "dedao"
local Setting = {}
local LOGIN_URL = "https://www.dedao.cn/"
+1 -1
View File
@@ -14,7 +14,7 @@ local cached = { { uid = "legacy-chapter", title = "旧目录" } }
package.preload["json"] = function() return Json end
package.preload["source.base"] = function()
return {
loadMeta = function() return { id = "ext.dedao", name = "得到阅读", type = "chapter" } end,
loadMeta = function() return { id = "dedao", name = "得到阅读", type = "chapter" } end,
defer = function(done, ...)
done(...)
return { cancel = function() end }
+1 -1
View File
@@ -31,7 +31,7 @@ local shelf = Mapper.shelf({
})
Assert.eq(#shelf, 1)
Assert.eq(shelf[1].stable_id, "e1")
Assert.eq(shelf[1].source_id, "ext.dedao")
Assert.eq(shelf[1].source_id, "dedao")
local found = Mapper.search({
data = { moduleList = { { layerDataList = {
+1 -1
View File
@@ -239,7 +239,7 @@ do
Assert.eq(cfg.cookie, before_cookie)
Assert.eq(cfg.uid, before_uid)
Client.confirmLoginAsync({ session = "late" }, function(ok, err) logged, login_err = ok, err end)
beginLogin("ext.dedao")
beginLogin("dedao")
cfg.cookie, cfg.uid, cfg.logged_in = nil, nil, nil
Client.reset()
held[path].done(wire({ uid_hazy = "late-user" }), nil, {})