♻️ 书源 id 去掉 ext. 前缀,沿用旧内置源数据
Co-authored-by: Copilot <[email protected]>
This commit is contained in:
1 parent
7273cef5e7
commit
c24928e413
6 files changed
+7
-7
No files matched your search
@@ -7,7 +7,7 @@
|
|||||||
local _ = require("l10n").get("moonsource_qimao")
|
local _ = require("l10n").get("moonsource_qimao")
|
||||||
|
|
||||||
return {
|
return {
|
||||||
id = "ext.qimao",
|
id = "qimao",
|
||||||
name = _("七猫小说"),
|
name = _("七猫小说"),
|
||||||
type = "chapter",
|
type = "chapter",
|
||||||
description = _("七猫小说书架与在线阅读"),
|
description = _("七猫小说书架与在线阅读"),
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ function Client.decode(raw, err)
|
|||||||
return wire
|
return wire
|
||||||
end
|
end
|
||||||
|
|
||||||
local SOURCE_ID = "ext.qimao"
|
local SOURCE_ID = "qimao"
|
||||||
local USER = "https://xiaoshuo.wtzw.com"
|
local USER = "https://xiaoshuo.wtzw.com"
|
||||||
local SHELF = "https://api-bs.wtzw.com"
|
local SHELF = "https://api-bs.wtzw.com"
|
||||||
local SHELF_PAGE_SIZE = 50
|
local SHELF_PAGE_SIZE = 50
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ local Text = require("utils.text")
|
|||||||
|
|
||||||
local Mapper = {}
|
local Mapper = {}
|
||||||
|
|
||||||
local SOURCE_ID = "ext.qimao"
|
local SOURCE_ID = "qimao"
|
||||||
|
|
||||||
local CDN = "https://cdn.wtzw.com"
|
local CDN = "https://cdn.wtzw.com"
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
local _ = require("l10n").get("moonsource_qimao")
|
local _ = require("l10n").get("moonsource_qimao")
|
||||||
|
|
||||||
local SOURCE_ID = "ext.qimao"
|
local SOURCE_ID = "qimao"
|
||||||
local Setting = {}
|
local Setting = {}
|
||||||
|
|
||||||
---@return boolean
|
---@return boolean
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
local Assert = require("support.assert")
|
local Assert = require("support.assert")
|
||||||
local Themed = require("support.theme_stubs")
|
local Themed = require("support.theme_stubs")
|
||||||
require("source.logout").replaceLibrary = function(id, commit)
|
require("source.logout").replaceLibrary = function(id, commit)
|
||||||
Assert.eq(id, "ext.qimao")
|
Assert.eq(id, "qimao")
|
||||||
commit()
|
commit()
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
@@ -90,7 +90,7 @@ Assert.eq(login_phone, "13800000000")
|
|||||||
Assert.eq(login_code, "001234")
|
Assert.eq(login_code, "001234")
|
||||||
Assert.eq(checked_token, "new-token", "登录返回的 token 仍先校验")
|
Assert.eq(checked_token, "new-token", "登录返回的 token 仍先校验")
|
||||||
Assert.eq(saved, "new-token")
|
Assert.eq(saved, "new-token")
|
||||||
Assert.eq(authorized, "ext.qimao")
|
Assert.eq(authorized, "qimao")
|
||||||
Assert.is_true(reloaded)
|
Assert.is_true(reloaded)
|
||||||
Assert.is_nil(cfg.phone, "不持久化手机号或短信码")
|
Assert.is_nil(cfg.phone, "不持久化手机号或短信码")
|
||||||
Assert.is_nil(cfg.code)
|
Assert.is_nil(cfg.code)
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ package.preload["moonsource_qimao.mapper"] = function()
|
|||||||
}
|
}
|
||||||
end
|
end
|
||||||
package.preload["source.base"] = function()
|
package.preload["source.base"] = function()
|
||||||
return { loadMeta = function() return { id = "ext.qimao", name = "七猫", type = "chapter" } end }
|
return { loadMeta = function() return { id = "qimao", name = "七猫", type = "chapter" } end }
|
||||||
end
|
end
|
||||||
package.preload["source.browse"] = function() return {} end
|
package.preload["source.browse"] = function() return {} end
|
||||||
package.preload["source.shelf"] = function() return {} end
|
package.preload["source.shelf"] = function() return {} end
|
||||||
|
|||||||
Reference in new issue
Block a user