mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-01-17 00:08:55 +01:00
Allow env variable to point to specific plugin path for debugging
This commit is contained in:
parent
cbbdb0ec29
commit
5f680d7277
1
index.js
1
index.js
@ -14,6 +14,7 @@ if (isDev) {
|
||||
if (devEnv.AllowIframe) process.env.ALLOW_IFRAME = '1'
|
||||
if (devEnv.BackupPath) process.env.BACKUP_PATH = devEnv.BackupPath
|
||||
if (devEnv.AllowPlugins) process.env.ALLOW_PLUGINS = '1'
|
||||
if (devEnv.ExternalPluginPath) process.env.EXTERNAL_PLUGIN_PATH = devEnv.ExternalPluginPath
|
||||
process.env.SOURCE = 'local'
|
||||
process.env.ROUTER_BASE_PATH = devEnv.RouterBasePath || ''
|
||||
}
|
||||
|
@ -161,6 +161,16 @@ class PluginManager {
|
||||
pluginsFound.push(plugin)
|
||||
}
|
||||
}
|
||||
if (process.env.EXTERNAL_PLUGIN_PATH) {
|
||||
const pluginName = Path.basename(process.env.EXTERNAL_PLUGIN_PATH)
|
||||
const plugin = await this.loadPlugin(pluginName, process.env.EXTERNAL_PLUGIN_PATH)
|
||||
if (plugin) {
|
||||
Logger.debug(`[PluginManager] Found external plugin "${plugin.manifest.name}"`)
|
||||
pluginsFound.push(plugin)
|
||||
} else {
|
||||
Logger.error(`[PluginManager] External plugin not found or invalid`)
|
||||
}
|
||||
}
|
||||
return pluginsFound
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user