♻️ 书源 id 去掉 ext. 前缀,沿用旧内置源数据
Co-authored-by: Copilot <[email protected]>
This commit is contained in:
1 parent
d08a5b45c0
commit
64bd8a5b48
6 files changed
+6
-6
No files matched your search
@@ -9,7 +9,7 @@
|
|||||||
local _ = require("l10n").get("moonsource_shuqi")
|
local _ = require("l10n").get("moonsource_shuqi")
|
||||||
|
|
||||||
return {
|
return {
|
||||||
id = "ext.shuqi",
|
id = "shuqi",
|
||||||
name = _("书旗小说"),
|
name = _("书旗小说"),
|
||||||
type = "chapter",
|
type = "chapter",
|
||||||
description = _("书旗书架与在线阅读"),
|
description = _("书旗书架与在线阅读"),
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ local _ = require("l10n").get("moonsource_shuqi")
|
|||||||
|
|
||||||
local Client = {}
|
local Client = {}
|
||||||
|
|
||||||
local SOURCE_ID = "ext.shuqi"
|
local SOURCE_ID = "shuqi"
|
||||||
local NOVEL = "https://read.xiaoshuo1-sm.com/novel/i.php"
|
local NOVEL = "https://read.xiaoshuo1-sm.com/novel/i.php"
|
||||||
local CONTENT = "https://content.shuqireader.com"
|
local CONTENT = "https://content.shuqireader.com"
|
||||||
local OCEAN = "https://ocean.shuqireader.com"
|
local OCEAN = "https://ocean.shuqireader.com"
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ local Text = require("utils.text")
|
|||||||
|
|
||||||
local Mapper = {}
|
local Mapper = {}
|
||||||
|
|
||||||
local SOURCE_ID = "ext.shuqi"
|
local SOURCE_ID = "shuqi"
|
||||||
local WALDEN_KEY = "37e81a9d8f02596e1b895d07c171d5c9"
|
local WALDEN_KEY = "37e81a9d8f02596e1b895d07c171d5c9"
|
||||||
local AND_KEY = "4b283ed2f94f02242415cc49fc4e3616"
|
local AND_KEY = "4b283ed2f94f02242415cc49fc4e3616"
|
||||||
local OCEAN_KEY = "eefc4798f28ea41622487ad80ef7e81c"
|
local OCEAN_KEY = "eefc4798f28ea41622487ad80ef7e81c"
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
local _ = require("l10n").get("moonsource_shuqi")
|
local _ = require("l10n").get("moonsource_shuqi")
|
||||||
local CookieLogin = require("source.cookie_login")
|
local CookieLogin = require("source.cookie_login")
|
||||||
|
|
||||||
local SOURCE_ID = "ext.shuqi"
|
local SOURCE_ID = "shuqi"
|
||||||
local Setting = {}
|
local Setting = {}
|
||||||
local LOGIN_URL = "https://t2.shuqi.com/oauth/login?priority=code&redirect_uri=https%3A%2F%2Ft.shuqi.com%2Fmyself"
|
local LOGIN_URL = "https://t2.shuqi.com/oauth/login?priority=code&redirect_uri=https%3A%2F%2Ft.shuqi.com%2Fmyself"
|
||||||
|
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ Assert.eq(found[1].stable_id, "8062580")
|
|||||||
Assert.eq(found[1].title, "三体")
|
Assert.eq(found[1].title, "三体")
|
||||||
Assert.eq(found[1].authors, "刘慈欣")
|
Assert.eq(found[1].authors, "刘慈欣")
|
||||||
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.shuqi")
|
Assert.eq(found[1].source_id, "shuqi")
|
||||||
Assert.is_nil(Mapper.searchBooks({ status = -1, info = { message = "parameter is missing" } }))
|
Assert.is_nil(Mapper.searchBooks({ status = -1, info = { message = "parameter is missing" } }))
|
||||||
|
|
||||||
local detail = Mapper.detail({
|
local detail = Mapper.detail({
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ package.loaded["source.toc"] = { index = function() return 1 end }
|
|||||||
local source = require("moonsource_shuqi.source").new()
|
local source = require("moonsource_shuqi.source").new()
|
||||||
local toc = { { uid = "11", title = "第一章" }, { uid = "12", title = "第二章" } }
|
local toc = { { uid = "11", title = "第一章" }, { uid = "12", title = "第二章" } }
|
||||||
source.loadTocAsync = function(_self, _identity, cb) return request(cb) end
|
source.loadTocAsync = function(_self, _identity, cb) return request(cb) end
|
||||||
local identity = { source_id = "ext.shuqi", stable_id = "9" }
|
local identity = { source_id = "shuqi", stable_id = "9" }
|
||||||
local calls = 0
|
local calls = 0
|
||||||
local handle = source:getProgressAsync(identity, function() calls = calls + 1 end)
|
local handle = source:getProgressAsync(identity, function() calls = calls + 1 end)
|
||||||
handle:cancel()
|
handle:cancel()
|
||||||
|
|||||||
Reference in new issue
Block a user