♻️ 书源 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 b342ac7ea1
commit 742da8a95d
6 files changed
+6 -6

No files matched your search

@@ -9,7 +9,7 @@
local _ = require("l10n").get("moonsource_tadu") local _ = require("l10n").get("moonsource_tadu")
return { return {
id = "ext.tadu", id = "tadu",
name = _("塔读小说"), name = _("塔读小说"),
type = "chapter", type = "chapter",
description = _("塔读书架与在线阅读"), description = _("塔读书架与在线阅读"),
@@ -12,7 +12,7 @@ local Text = require("utils.text")
local _ = require("l10n").get("moonsource_tadu") local _ = require("l10n").get("moonsource_tadu")
local Client = {} local Client = {}
local SOURCE_ID = "ext.tadu" local SOURCE_ID = "tadu"
local ORIGIN = "https://www.tadu.com" local ORIGIN = "https://www.tadu.com"
function Client.cookie() function Client.cookie()
@@ -8,7 +8,7 @@ local Text = require("utils.text")
local Mapper = {} local Mapper = {}
local SOURCE_ID = "ext.tadu" local SOURCE_ID = "tadu"
--- 目录缓存格式。首章携带,变了就当缓存失效。 --- 目录缓存格式。首章携带,变了就当缓存失效。
Mapper.TOC_VERSION = 1 Mapper.TOC_VERSION = 1
@@ -7,7 +7,7 @@
local _ = require("l10n").get("moonsource_tadu") local _ = require("l10n").get("moonsource_tadu")
local CookieLogin = require("source.cookie_login") local CookieLogin = require("source.cookie_login")
local SOURCE_ID = "ext.tadu" local SOURCE_ID = "tadu"
local Setting = {} local Setting = {}
local LOGIN_URL = "https://www.tadu.com/v3/loginpage" local LOGIN_URL = "https://www.tadu.com/v3/loginpage"
+1 -1
View File
@@ -36,7 +36,7 @@ Assert.eq(found[1].title, "三体宇宙")
Assert.eq(found[1].authors, "刘慈欣") Assert.eq(found[1].authors, "刘慈欣")
Assert.eq(found[1].intro, "星际") Assert.eq(found[1].intro, "星际")
Assert.eq(found[1].cover, "https://img/a.jpg") Assert.eq(found[1].cover, "https://img/a.jpg")
Assert.eq(found[1].source_id, "ext.tadu") Assert.eq(found[1].source_id, "tadu")
local home, home_err = Mapper.shelfPage("<title>小说,小说网-塔读小说网|免费阅读最新热门小说</title>") local home, home_err = Mapper.shelfPage("<title>小说,小说网-塔读小说网|免费阅读最新热门小说</title>")
Assert.is_nil(home) Assert.is_nil(home)
+1 -1
View File
@@ -211,7 +211,7 @@ Chapter.openAsync = function(_source, identity, _book, _opts, ops, cb)
end) end)
end end
require("moonsource_tadu.source").new():openBookAsync({ require("moonsource_tadu.source").new():openBookAsync({
source_id = "ext.tadu", stable_id = "font-fixture", book = { title = "书名" }, source_id = "tadu", stable_id = "font-fixture", book = { title = "书名" },
}, { chapter_idx = 1 }, function() end) }, { chapter_idx = 1 }, function() end)
Chapter.openAsync = open_async Chapter.openAsync = open_async
Assert.is_true(document:find(decoded, 1, true) ~= nil) Assert.is_true(document:find(decoded, 1, true) ~= nil)