plugins/examples/library-inspector-rs/README.md
A Navidrome plugin written in Rust that demonstrates the Library host service. It periodically logs details about all configured music libraries and finds the largest file in the root of each library directory.
wasm32-wasip1 target# Install the WASM target if you haven't already
rustup target add wasm32-wasip1
# Build the plugin
cargo build --target wasm32-wasip1 --release
# Package as .ndp
zip -j library-inspector.ndp manifest.json target/wasm32-wasip1/release/library_inspector.wasm
Or use the provided Makefile from the examples directory:
cd plugins/examples
make library-inspector.ndp
.ndp file to your Navidrome plugins folder[Plugins]
Enabled = true
Folder = "/path/to/plugins"
Configure the inspection interval in the Navidrome UI (Settings → Plugins → library-inspector):
| Key | Description | Default |
|---|---|---|
cron | Cron expression for inspection interval | @every 1m |
This plugin requires:
=== Library Inspection Started ===
Found 2 libraries
----------------------------------------
Library: My Music (ID: 1)
Songs: 5432 tracks
Albums: 456
Artists: 234
Size: 45.67 GB
Duration: 312h 45m
Mount: /libraries/1
Largest file in root: cover.jpg (2.34 MB)
----------------------------------------
Library: Podcasts (ID: 2)
Songs: 128 tracks
Albums: 12
Artists: 8
Size: 3.21 GB
Duration: 48h 15m
Mount: /libraries/2
Largest file in root: episode-001.mp3 (156.78 MB)
=== Library Inspection Complete ===
GPL-3.0 - Same as Navidrome