mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-06-05 02:02:44 +02:00
Example of potential plugin implementation
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
const PluginAbstract = require('../../../../../server/PluginAbstract')
|
||||
|
||||
class ExamplePlugin extends PluginAbstract {
|
||||
constructor() {
|
||||
super()
|
||||
|
||||
this.name = 'Example'
|
||||
}
|
||||
|
||||
init(context) {
|
||||
context.Logger.info('[ExamplePlugin] Example plugin loaded successfully')
|
||||
}
|
||||
|
||||
async onAction(context, actionName, target, data) {
|
||||
context.Logger.info('[ExamplePlugin] Example plugin onAction', actionName, target, data)
|
||||
}
|
||||
}
|
||||
module.exports = new ExamplePlugin()
|
||||
Reference in New Issue
Block a user