♻️ 书源 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 b41273ef9b
commit 43d4fcfabc
11 files changed
+32 -32

No files matched your search

+1 -1
View File
@@ -38,7 +38,7 @@ package.loaded["http.request"] = {
}
local Chapter = require("moonsource_kuaikan.chapter")
local called = false
local identity = { source_id = "ext.kuaikan", stable_id = "book" }
local identity = { source_id = "kuaikan", stable_id = "book" }
local handle = Chapter.materializeAsync(identity, { uid = "1", vip = true }, nil, function() called = true end)
Assert.is_true(fetched)
handle.cancel()
+1 -1
View File
@@ -35,7 +35,7 @@ local detail = Mapper.detail(page.info, page.nickname)
Assert.eq(detail.stable_id, "9")
Assert.eq(detail.authors, "翘摇")
Assert.eq(detail.cover, "https://c/a.jpg")
Assert.eq(detail.source_id, "ext.kuaikan")
Assert.eq(detail.source_id, "kuaikan")
Assert.eq(detail.intro, "简介")
local toc = Mapper.chapters(page.chapters)
Assert.eq(#toc, 2)
+1 -1
View File
@@ -36,7 +36,7 @@ source.loadTocAsync = function(_self, _identity, cb)
cb(toc)
return { cancel = function() cancelled.toc = true end }
end
local identity = { source_id = "ext.kuaikan", stable_id = "book" }
local identity = { source_id = "kuaikan", stable_id = "book" }
local called = false
local handle = source:openBookAsync(identity, nil, function() called = true end)
Stubs.flush()
+1 -1
View File
@@ -29,7 +29,7 @@ function source:loadTocAsync(_identity, cb)
cb({ { uid = "11", idx = 1, title = "One" }, { uid = "22", idx = 2, title = "Two" } })
return { cancel = function() end }
end
local identity = { source_id = "ext.kuaikan", stable_id = "review-test", chapter_idx = 1 }
local identity = { source_id = "kuaikan", stable_id = "review-test", chapter_idx = 1 }
local page, err
source:paragraphReviewPageAsync(identity, "chapter", 0, function(value, reason) page, err = value, reason end)
Assert.is_nil(err)
+1 -1
View File
@@ -25,7 +25,7 @@ package.loaded["source.auth"] = {
expire = function() expired = true end,
}
package.loaded["source.shelf"] = { syncAsync = function(id, remote, _mapper, opts, cb)
Assert.eq(id, "ext.kuaikan")
Assert.eq(id, "kuaikan")
Assert.is_true(opts.force)
Assert.is_true(remote.writing)
return remote:shelfSyncAsync(function(books, err)
+1 -1
View File
@@ -103,7 +103,7 @@ source.loadTocAsync = function(_self, _identity, cb)
cb(toc)
return { cancel = function() error("已完成目录不得覆盖当前请求") end }
end
local identity = { source_id = "ext.kuaikan", stable_id = "9" }
local identity = { source_id = "kuaikan", stable_id = "9" }
local handle = source:putProgressAsync(identity,
{ fraction = 0.6875, chapter_idx = 2, chapter_fraction = 0.375, page = 3, total_pages = 8 }, done)
reply(account)