mirror of
https://github.com/navidrome/navidrome.git
synced 2026-05-03 06:51:16 +00:00
42 lines
1.4 KiB
YAML
42 lines
1.4 KiB
YAML
version: v1-draft
|
|
|
|
exports:
|
|
nd_on_init:
|
|
description: |
|
|
Called after a plugin is fully loaded with all services registered.
|
|
Plugins can use this function to perform one-time initialization tasks,
|
|
such as establishing connections, starting background processes, or
|
|
validating configuration.
|
|
|
|
This function is called once when the plugin is loaded, and is NOT
|
|
called when the plugin is hot-reloaded. Plugins should not assume
|
|
this function will be called on every startup.
|
|
|
|
The input is currently empty (reserved for future use). The output
|
|
can contain an error string if initialization failed, which will be
|
|
logged but will not prevent the plugin from being loaded.
|
|
input:
|
|
$ref: "#/components/schemas/OnInitInput"
|
|
contentType: application/json
|
|
output:
|
|
$ref: "#/components/schemas/OnInitOutput"
|
|
contentType: application/json
|
|
|
|
components:
|
|
schemas:
|
|
OnInitInput:
|
|
description: Input provided to the init callback (currently empty, reserved for future use)
|
|
type: object
|
|
properties: {}
|
|
|
|
OnInitOutput:
|
|
description: Output from the init callback
|
|
type: object
|
|
properties:
|
|
error:
|
|
type: string
|
|
nullable: true
|
|
description: |
|
|
Error message if initialization failed. Empty or null indicates success.
|
|
The error is logged but does not prevent the plugin from being loaded.
|