🐛 修复书源加载失败与描述格式

loadmeta 返回函数,修 new() 时报 attempt to call a table;
插件描述统一成「月读书源:哔哩哔哩漫画」,main.lua 与其它书源一致。
This commit is contained in:
Garfield committed 2026-11-27 07:43:52 +08:00
1 parent 455891353c
commit 4a031e00c5
5 files changed
+11 -17

No files matched your search

+3 -7
View File
@@ -1,9 +1,5 @@
local PLUGIN_DIR = debug.getinfo(1, "S").source:match("^@(.*)/[^/]*$") or "." local _ = require("gettext")
if not package.path:find(PLUGIN_DIR .. "/?.lua", 1, true) then
package.path = PLUGIN_DIR .. "/?.lua;" .. package.path
end
return { return {
fullname = "哔哩哔哩漫画书源", fullname = _("月读书源:哔哩哔哩漫画"),
description = "moonsource-bilimanga", description = _("给月读增加「哔哩哔哩漫画」书源。需要同时安装月读,与平台官方无关。"),
} }
+3 -7
View File
@@ -1,10 +1,6 @@
local PLUGIN_DIR = debug.getinfo(1, "S").source:match("^@(.*)/[^/]*$") or "." --[[--
if not package.path:find(PLUGIN_DIR .. "/?.lua", 1, true) then KOReader 只认带 main.lua 的插件目录;书源本身不需要任何插件钩子,月读读取旁边的 moon_source.lua。
package.path = PLUGIN_DIR .. "/?.lua;" .. package.path --]]
end
local _ = require("moonsource_bilimanga.l10n")
local WidgetContainer = require("ui/widget/container/widgetcontainer") local WidgetContainer = require("ui/widget/container/widgetcontainer")
return WidgetContainer:extend{ return WidgetContainer:extend{
@@ -13,7 +13,7 @@ return {
provides = { provides = {
source = true, source = true,
}, },
meta = function() return require("moonsource_bilimanga.loadmeta") end, meta = function() return require("moonsource_bilimanga.source").meta() end,
new = function() return require("moonsource_bilimanga.source").new() end, new = function() return require("moonsource_bilimanga.source").new() end,
setting = lazy("moonsource_bilimanga.setting"), setting = lazy("moonsource_bilimanga.setting"),
} }
@@ -7,7 +7,7 @@ return {
description = "哔哩哔哩漫画书源", description = "哔哩哔哩漫画书源",
abilities = { abilities = {
search = true, search = true,
browse = false, browse = true,
sync = true, sync = true,
progress = true, progress = true,
cover = true, cover = true,
@@ -3,4 +3,6 @@ if not package.path:find(PLUGIN_DIR .. "/?.lua", 1, true) then
package.path = PLUGIN_DIR .. "/?.lua;" .. package.path package.path = PLUGIN_DIR .. "/?.lua;" .. package.path
end end
return require("moonsource_bilimanga._meta") return function()
return require("moonsource_bilimanga._meta")
end