kobolight(refactor): move into plugin & only enable for kobo

This commit is contained in:
Qingping Hou
2016-12-04 15:42:22 -08:00
parent 0c49b915de
commit a6c506dc10
6 changed files with 150 additions and 146 deletions

View File

@@ -23,9 +23,9 @@ function PluginLoader:loadPlugins()
if not ok then
DEBUG("Error when loading", mainfile, plugin_module)
end
package.path = package_path
package.cpath = package_cpath
if ok then
if not plugin_module.disabled and ok then
package.path = package_path
package.cpath = package_cpath
plugin_module.path = path
plugin_module.name = plugin_module.name or path:match("/(.-)%.koplugin")
table.insert(self.plugins, plugin_module)